New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Nginx and Password Protecting Directories
Hi. I placed this file inside the folder I want password protected as .htaccess
# nginx configuration auth_basic "Restricted Area"; auth_basic_user_file /home/nginx/domains/mydomain.com/private/.htpasswd;
But when I go to that page it does not request me to enter the details stored in .htpasswd.
I even tried restarting nginx.
Anyone know what I am doing wrong?
Comments
Have you set up Nginx in such a way that it will load .htaccess files like that?
.htaccess is an Apache concept, so unless you have configured Nginx to, it's not going to read any .htaccess files.
Nope. All I've done so far is install CentMinMod http://centminmod.com/
I didn't know .htaccess was an only apache thing.
Time to set this up http://kbeezie.com/protecting-folders-with-nginx/
Got it all working now.
Thanks @Detruire