Last active
December 12, 2015 07:18
-
-
Save magnetikonline/4735909 to your computer and use it in GitHub Desktop.
Magento Nginx default deny ruleset.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a fairly complete set of deny rules for Magento when running under Nginx webserver | |
# replicating functionality from the .htaccess files present in a base install. | |
location ~ "\.htaccess$" { | |
deny all; | |
} | |
location ^~ /app/ { | |
deny all; | |
} | |
location ^~ /downloader/template/ { | |
deny all; | |
} | |
location ^~ /includes/ { | |
deny all; | |
} | |
location ^~ /lib/ { | |
deny all; | |
} | |
location ^~ /media/customer/ { | |
deny all; | |
} | |
location ^~ /media/downloadable/ { | |
deny all; | |
} | |
location ^~ /pkginfo/ { | |
deny all; | |
} | |
location ^~ /var/ { | |
deny all; | |
} | |
# this is going to be optional if calling cron.php from the webserver side (but, this is pretty tacky - CRONTAB/PHPCLI is better for this job) | |
location = /cron.php { | |
deny all; | |
} | |
location = /mage { | |
deny all; | |
} | |
location = /RELEASE_NOTES.txt { | |
deny all; | |
} | |
location ~ "\.sh$" { | |
deny all; | |
} | |
location ~ "^/downloader/.+\.(cfg|ini|xml)$" { | |
deny all; | |
} | |
location ~ "^/errors/.+\.(phtml|xml)$" { | |
deny all; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment