On Tuesday 03 August 2004 23:46, Voytek wrote:
> I'm trying to control access to a web subdir without editing httpd.conf
> I've created a '.htaccess' file in the target dir, but, I still can open
> that directory through browser, what am I missing ?
You may need to edit httpd.conf at least once :-( In the relevant directory
section, you'll need to add
AllowOverride AuthConfig
which tells apache to honour access controls in .htaccess files. It would
looks something like this:
<Directory /var/www/>
Options Indexes Includes FollowSymLinks MultiViews
# AllowOverride None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Alternatively you could create a specific Directory section for your
subdirectory. However including the AuthConfig directive at the document root
would allow you to add controls to future subdirectories without the need to
rejig your server.
Seb
>
> File: .htaccess
>
> ---
> AuthType Basic
> AuthName "Staff Use Only"
> AuthUserFile /etc/httpd/conf/.htpasswd
> Require valid-user
> ----
>
> --
> Voytek
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html