On Sat, 30 Aug 2003 06:17:28 GMT, pbwh RemoveThis @nospam.net (Paul) wrote:
>On Sat, 30 Aug 2003 04:47:00 GMT, "Mike Fuchida" <betac RemoveThis @deltaco.us>
>wrote:
>>This doesn't work because "/var/www" is the name of the directory in
>>relation to your system, not to the server. What you need to do is use the
>>virtual directory, not the absolute one. Replace "/var/www" with "/" and
>>you should have it fixed (i.e. no one will be able to access anything on
>>your server from another IP addy).
>
>
>I tried "/" . That didnt work either. BTW, I think "/" refers to the
>whole filesystem, not just the DocumentRoot (according to p.68 of
>"Apache: The definitive guide", by Laurie).
I found out what the problem was. There is another <Directory>
container that comes after the one i mentioned in the first post. It
says this:
<Directory "/var/www/htdocs">
Order allow,deny
Allow from all
</Directory>
This container overrides the first one, so that files from
/var/www/htdocs will be served to anyone.
So the solution is have one container that says:
<Directory "/var/www/htdocs">
Order deny,allow
deny from all
allow from 12.34.56.78
</Directory>
where 12.34.56.78 is the sole IP that I want to allow, and then delete
or comment out the other <Directory> container.
Paul<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: <Directory> question