server { listen 8888 default_server; listen [::]:8888 default_server; index index.php index.html index.htm ; server_name 127.0.0.1 localhost _; set $MAGE_ROOT /var/www/html; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; root $MAGE_ROOT; charset utf-8; location ~ \.html { if (!-e $request_filename){ rewrite ^(.*)$ /nf.php; } } location ~ [^/]\.php(/|$) { include snippets/fastcgi-php.conf; fastcgi_pass 127.0.0.1:9000; } location /api { rewrite ^(.*)$ /api.php; } location ~ /\.ht { deny all; } location /config.php { deny all; } location /debmes.txt { deny all; } }