From 2226eaf243a3ba4249da8d9d4d0ba5a98961fb5b Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 13 Sep 2023 18:36:38 +0300 Subject: [PATCH] update nginx example --- example/environment/nginx | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/example/environment/nginx b/example/environment/nginx index 81e7d5f..6372b45 100644 --- a/example/environment/nginx +++ b/example/environment/nginx @@ -1,6 +1,28 @@ server { - listen [::]:80 ipv6only=on default_server; + listen [::]:80 default; - allow 0200::/7; - deny all; + allow 0200::/7; + deny all; + + root /var/www/html; + + index index.html index.htm index.nginx-debian.html index.php; + + server_name _; + + location / { + try_files $uri $uri/ =404; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php8.1-fpm.sock; + + # default, mirror, dev, test, prod + fastcgi_param PHP_ENV default; + } + + location ~ /\. { + deny all; + } } \ No newline at end of file