From 4e6bea9ce9c337690094d0cb3977b6bdc98b3986 Mon Sep 17 00:00:00 2001 From: HluthWigg Date: Sat, 18 Feb 2023 22:12:17 +0100 Subject: [PATCH] Create nginx-paheko.conf --- config/nginx-paheko.conf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 config/nginx-paheko.conf diff --git a/config/nginx-paheko.conf b/config/nginx-paheko.conf new file mode 100644 index 0000000..5729deb --- /dev/null +++ b/config/nginx-paheko.conf @@ -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; + } +} +