-
Notifications
You must be signed in to change notification settings - Fork 30
Website: I need to deny access to directory but .htaccess doesn't work
Daniel Speichert edited this page Jan 30, 2016
·
1 revision
Sometimes you may want to deny public access to sensitive directories that are located in your public directory. You may be tempted to type "deny from all" in a .htaccess
files but that does not work on nginx!
The correct solution is to modify the chmod (permissions) on the file or directory. Simply omit access to "others" using PuTTY or WinSCP. The command to do it over SSH:
chmod o-rwx /path/to/directory/or/file
Powered by Spigu.net Team | Get OTS Hosting Service with support | Visit our Otland Thread