Link to home
Start Free TrialLog in
Avatar of johndew
johndew

asked on

problem getting htaccess file work

Hi!

I have apache 1.3 running on my Slackware computer

I set up user and password in a file called passwords under usr/bin/ with the htpasswd utility

I have made a .htaccess file in a htdocs folder

The file look like this

AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /usr/bin/passwords
Require user stig


I restarted apache, even if that should not be necesary with .htaccess files. When I thereafter open the folder in my browser under //localhost/test/ it shows the page without requesting username and password!

What is wrong???
ASKER CERTIFIED SOLUTION
Avatar of Mercantilum
Mercantilum
Flag of Japan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yuzh
yuzh

In your httpd.conf file, you need to ensure that AccessFileName .htaccess is set but you also have to
make sure that whatever directory has the modes Allowoverride setup correctly in your main
directory statement, eg:

<Directory "/your-dir">
    bla bla bla ... extra stuff
    AllowOverride Auth
</Directory>

or:

<Location /your-dir>
 AllowOverride Auth
</Location>

you can put then in your VirtualHost.