server { listen 82 default_server; listen [::]:82 default_server; root /mnt/data/majordomo; index index.php index.html index.htm index.nginx-debian.html; server_name _; location / { index index.html index.htm index.php; rewrite pda$ /popup/pda.html redirect; if (!-e $request_filename){ rewrite ^(.*)$ /nf.php; } if (!-e $request_filename){ rewrite ^(.*)$ /nf.php; } } location ~* (\.php)$ { try_files $uri = 404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } }