Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I got this problem with my apache running on my gentoo server...=( My document root is /var/www/localhost/htdocs and if I put in a .htaccess file that looks like this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Posts
    2

    Apache and location of the .htaccess file..


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

    My document root is
    /var/www/localhost/htdocs

    and if I put in a .htaccess file that looks like this in
    /var/www/localhost/htdocs/test/

    Code:
    /var/www/localhost/htdocs
    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
    /var/www/localhost/www.mydomain.com

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

    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??=)

    Regardz,
    -- Jonsjo

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    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 http://whatever.domain.com
    will be the same as http://whatever.domain.com/otherDirectory
    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
  •