We help IT Professionals succeed at work.

problem getting htaccess file work

johndew
johndew asked
on
230 Views
Last Modified: 2010-03-04
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???
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
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.


Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.