LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   htaccess help (https://www.linuxquestions.org/questions/linux-general-1/htaccess-help-53094/)

skillcoyne 04-02-2003 02:47 PM

htaccess help
 
I've been playing with setting up a password protected part of our website. I made it work on a test version within the website. However, I just set it up in the directory I really need it and now after I input my name and password I get 500 Internal Server Error. I'm not sure how I caused this. If anyone else has worked with the htpasswd stuff I could use your help :)

Thanks

david_ross 04-02-2003 03:13 PM

Make sure you have
Code:

AllowOverride AuthConfig
for that directory in httpd.conf - if it doens't work try posting your htaccess file.

skillcoyne 04-02-2003 03:34 PM

i tried
 
adding that line in the httpd.conf file but I still get the internal error message. Does it make a difference how deep a subdirectory it is?

htacces file:

AuthName /misc/secure/my.htpasswd
AuthGroupFile /dev/null
AuthName "Member Files"
AuthType Basic


<Limit GET>
require valid-user
</Limit>

david_ross 04-02-2003 03:42 PM

I think you just made a typo on the first line. You also don't need a group file if you aren't using one.
Code:

AuthUserFile /misc/secure/my.htpasswd
AuthName "Member Files"
AuthType Basic

<Limit GET>
require valid-user
</Limit>

I forgot to say that you will also need to restart apache after moding the config.
/etc/init.d/httpd restart

It doesn't matter about the depth down he directory structure - apache will inherit permissions from the parent directory.

skillcoyne 04-02-2003 03:46 PM

I should have known it'd be so simple! Thanks David!!


All times are GMT -5. The time now is 10:22 AM.