There is also a nicer way with nesting locations: Assuming you have this file that will be used in includes for the site config: /etc/nginx/fastcgi_php: location ~ \.php$ { # Zero-day exploit defense. # http://forum.nginx.org/read.php?2,88845,page=3 try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAMEby calimero - How to...
Hi, I've googled this to death and can't find any solution... I have a fairly standard wordpress setup under nginx and I would like to restrict the wp-admin pages to localhost. Here is what my config looks like: server { server_name example.com; root /var/www/example.com; index index.php index.html index.htm; # Deny access to any files with a .php extension in the uploaby calimero - How to...