Jump to content

htaccess basic authentication just stops working.


rpjones007

Recommended Posts

I'm using Apache Basic Authentication (htaccess) to protect a subdirectory within my website.  I can't figure out why, but occasionally (every couple of weeks), the authentication seems to just stop working.  I manage the server myself, so I know there are no server side changes.  I can't figure it out. 

In order to isolate the problem, I turned off AllowOverride:
AllowOverride None

So, rather than using .htaccess file in the directory, I moved all of my directives into the main /etc/httpd/conf.d/site.conf file:

<Directory /var/www/sites/steamers/admin>
  AuthName "Admin Console"
  AuthType Basic
  AuthUserFile /var/www/htpasswd/steamers.htpasswd
  require valid-user
</Directory>

There is only one user in the steamers.htpasswd file.  For a while, it will be working just fine, and then for some unknown reason, it will just stop authenticating.  The authentication window still comes up, but the user and password stop working.  I can change the password at the command line and reload apache, but it still doesn't work.

The even weirder thing is that if I go into the /etc/httpd/conf.d/site.conf file, comment out the entire section that I listed above, and restart apache attempting to disable authentication altogether, the authentication window still comes up.  I can't even disable authentication.

This is killing me right now.  Any ideas would be greatly appreciated.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.