Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

sorry to ask this again, I know that it's been asked before but I've literally read every discussion for trouble shooting and I'm still having problems

heres my code:

AllowOverride AuthConfig
AuthUserFile path/index/.htpasswd
AuthType Basic
AuthName "restricted area"
AuthGroupFile /dev/null
require valid-user

whenever I delete the .htaccess from the server the pages run normally but when I re-add the .htaccess I get the internal server error. It's really weird because occasionally an enter your password window comes up even but when I enter the password the window reappears, as if the password was entered incorrectly, and when I reload the page I get the 500 server error. Thanks in advance for the much needed help!!!

share|improve this question
 
I think you have a syntax error in .htaccess...can you show us this file ? –  user2196728 42 mins ago
 
What's your error logs say? –  Jon Lin 30 mins ago
 
I don't know how to access the error logs.. also that's all that I have in .htaccess –  user3015721 22 mins ago

1 Answer

This line:

AllowOverride AuthConfig

Is probably what's causing you the error. The AllowOverride directive tells apache what is allowed to be used in things like htaccess files. So obviously, it's not something you can set in your htaccess file. AllowOverride needs to be in the server or vhost config, and the AuthConfig part of it tells apache that you can have auth directives (like AuthType, AuthName, etc) in an htaccess file.

share

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.