simple_php (777B)
1 server { 2 listen 80; 3 listen [::]:80; 4 5 server_name _; 6 7 root /srv/http/simple; 8 9 add_header X-Frame-Options "DENY" always; 10 add_header Referrer-Policy "no-referrer" always; 11 12 access_log /var/log/nginx/simple-access.log; 13 14 index index.php index.html index.htm; 15 16 location / { 17 try_files $uri $uri/ =404; 18 #try_files $uri $uri/ @rewrite; 19 } 20 21 #location @rewrite { 22 # rewrite ^/([^/?]+)/?$ /?q=$1 last; 23 #} 24 25 location ~ \.php$ { 26 include snippets/fastcgi-php.conf; 27 28 # With php-fpm (or other unix sockets): 29 fastcgi_pass unix:/run/php/php8.4-fpm.sock; 30 #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 31 } 32 33 # deny access to .htaccess files, if Apache's document root 34 # concurs with nginx's one 35 # 36 #location ~ /\.ht { 37 # deny all; 38 #} 39 }