InGale Posted August 4, 2011 Share Posted August 4, 2011 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 More sharing options...
justsomeguy Posted August 4, 2011 Share Posted August 4, 2011 What is the word "resides" doing there? Link to comment Share on other sites More sharing options...
InGale Posted August 4, 2011 Author Share Posted August 4, 2011 What is the word "resides" doing there?I frankly don't know... I copied the content from a tutorial, though they didn't explain anything about this line... I'll try to comment it out, see if it works... Link to comment Share on other sites More sharing options...
justsomeguy Posted August 4, 2011 Share Posted August 4, 2011 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 More sharing options...
InGale Posted August 4, 2011 Author Share Posted August 4, 2011 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 More sharing options...
InGale Posted August 4, 2011 Author Share Posted August 4, 2011 OK, got the error: «This directory is protected» should've been written with double quotes, "This directory is protected"... Now it works! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.