What am I missing?
Dave Hull
dphull at insipid.com
Mon May 5 14:18:41 CDT 2003
On Sun, 4 May 2003, Bradley Miller wrote:
> At 10:32 PM 5/4/2003 -0500, you wrote:
>
> >Which one was it?
>
> There was a "main" one clear at the beginning of my httpd.conf file. No
> matter what I did do the actual directory, it was set to "none" and killed
> my .htaccess/passwd file.
If you're the administrator of the web server on this box, you should consider
leaving things the way they are and set your overrides in the main httpd.conf
file on a per directory basis, rather than allowing overrides globally.
If you set the main config file to allow overrides globally, it will slow down
your web server according to Apache's documentation. The reason is that the
web server will have to search through every directory in the path to the
document being served checking to see if there are any .htaccess files.
You can simply add a new <Directory>...</Directory> section for the directory
you want to restrict access to like so:
# First Directory entry for server root
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# DocumentRoot Directory entry
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Restricted Directory
<Directory "/var/www/html/manuals/perl">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
Deny from all
Allow from 192.168.1.0/24
AuthType Basic
AuthName Perl
AuthUserFile /var/www/hackme.pwd
AuthGroupFile /dev/null
Require valid-user
</Directory>
...
Again, according to Apache's docs, doing things this way will speed up the web
server. Whereas allowing overrides at the DocumentRoot will cause the server
to check every directory in the path for a .htaccess file.
Good luck.
--
Dave Hull
http://insipid.com
> When you consider that after a mere 10 years of development NT is
> nearly on par (already there in a lot of ways) with a 40 year old
> OS, who do you think will be functionally superior in another 10
> years? My money is on Redmond.
A startup that's only let's see...10:40 = 2.25:10...two and a half
years old.
Also, your money is pending litigation by the supreme court.
-- Steve Nordquist, Trollboy Re: Balkanizing Linux, 03/28/00
More information about the Kclug
mailing list