Create nginx-paheko.conf

This commit is contained in:
HluthWigg 2023-02-18 22:12:17 +01:00 committed by GitHub
parent b1ffa063cd
commit 4e6bea9ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

35
config/nginx-paheko.conf Normal file
View file

@ -0,0 +1,35 @@
server {
listen [::]:80 default_server; # port 80 is the usual HTTP port
listen 80 default_server;
server_name _; # no domain name (local)
sendfile off;
root /var/www/paheko/www; # root of the website
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.php
try_files $uri $uri/ /_route.php?$query_string;
index index.php /_route.php;
}
location ~ \.php {
try_files $uri $uri/ /_route.php?$query_string;
include fastcgi.conf;
#fastcgi_pass 127.0.0.1:9000; # Si vous utilisez PHP-FPM (ou autre) en mode TCP et non sur une socket
fastcgi_pass unix:/run/garradin.sock; # Si vous utilisez PHP-FPM en mode socket
}
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
expires 5d;
}
# deny access to . files, for security
location ~ /\. {
log_not_found off;
deny all;
}
}