Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Apache and location of the .htaccess file..

    I got this problem with my apache running on my gentoo server...=(

    My document root is

    and if I put in a .htaccess file that looks like this in

    AuthUserFile /var/www/localhost/.htpasswd
    AuthGroupFile /dev/null
    AuthName EnterPassword
    AuthType Basic
    require user smurf
    and it works realy well.. I get an box that asks me what password and username that I have...

    Then I have a lot of vhosts ... For instance one that goes to

    my vhosts.conf has a line that looks like this:
    DocumentRoot /var/www/localhost/

    I can browse that page without problem, yet when I put in the exactly same .htaccess file as abowe, i dont get to a responce that asks for username and password.. It seems to skip the .htaccess file

    Does anyone now what I have done wrong?
    Can anyone help me??=)

    -- Jonsjo

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    SE, Stockholm
    Is this true even if you restart your browser?
    I would beleive it is due to how your browser cache the login information,
    and if you access a vitual server like
    will be the same as
    if you use the same login credentials

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts