problem getting htaccess file work

  • wiggywag
  • Newbie
  • Newbie
  • wiggywag
  • Posts: 13

Post 3+ Months Ago

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???
  • JohnDeW
  • Newbie
  • Newbie
  • JohnDeW
  • Posts: 9

Post 3+ Months Ago

Personnaly I had similar problems and now include this code in the global httpd.conf file.

Same but you just have to put that in <Directory..>

<Directory /your/htdocs/dir/htdocs>
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /usr/bin/passwords
Require user stig
</Directory>

--

Besides if you want to keep using .htaccess that you may want to check the access rights to your .htaccess file:
does your apache user (nobody ? web ? www ? ...) has access to
1. both .htaccess and /usr/bin/passwords ?
2. the directories leading to passwords and .htaccess (need at least a "x" for your apache server)

In your httpd.conf files do you have
AccessFileName .htaccess

Some more help at http://httpd.apache.org/docs/howto/htaccess.html
  • wiggywag
  • Newbie
  • Newbie
  • wiggywag
  • Posts: 13

Post 3+ Months Ago

I changed the override settings to this in httpd.config and after that everything works perfect!


# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride AuthConfig



Thanks!

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.