Jump to content

Problem with protecting directory with password


InGale

Recommended Posts

Hi!I have a directory named "panel", which is supposed to be protected with password. In this directory I store a .htaccess file, which has the following info:#Protect directory with a passwordresidesAuthType basicAuthName «This directory is protected»AuthUserFile /var/www/vhosts/mysitename/httpdocs/pwd/.htpasswd#AuthGroupFile /dev/nullRequire valid-userpwd is a directory where I store the .htpasswd file. But now when I'm trying to access my "panel" directory from a browser, I'm getting a 500 Internal Server Error message. What am I doing wrong and how can I fix it? Thanks!

Link to comment
Share on other sites

OK. Step 1 is to go through every line you have and research it to figure out what it does, why it does it, and if you need it. It's easy to get errors when you copy and paste without understanding. You won't be able to fix the errors without understanding.

Link to comment
Share on other sites

I tried to research it, didn't find any info about this line. Regarding the rest, I've read so many texts about it, looks like I did everything right... I just read this tutorial again: http://www.csuchico.edu/eapp/INTERNET/htaccess.html, now my file looks like this:#Protect directory with a password#residesAuthUserFile /var/www/vhosts/mysite/httpdocs/pwd/.htpasswdAuthGroupFile /dev/nullAuthName «This directory is protected»AuthType basic#<LIMIT GET>#require user username#</LIMIT>#Require valid-userI'm still getting this 500 error...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...