Welcome! Log In Create A New Profile


Deny rules not working - raw php files being served!

March 10, 2013 05:36AM
Hi all,

I'm using a pretty simple WordPress nginx config that is documented on the WordPress codex.


All works fine except for 1 critical aspect.

The config uses a restrictions.conf which has some fairly simple rules for blocking unauthorized access to specific files and file patterns like the following:

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~ /\. {
deny all;

What I've found is rather than actually denying requests, raw php files are being served up via nginx - which is very odd.

Any ideas why this would be happening?

Subject Author Posted

Deny rules not working - raw php files being served!

edbloom March 10, 2013 05:36AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 232
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready