Apache - Deny by IP help

Soldato
Joined
18 May 2010
Posts
22,893
Location
London
I've got three sites up and running.

Trying to block IP access to site.

I've add the following in to the httpd.conf file.

<Directory /srv/www/andrewspress.com>
AllowOverride none
Order allow,deny
Deny from 10.2.2.126
</Directory>


It works in the sense my other sites are accessible and the andrewspress.com domain isn't.

Only problem is that the 403 Forbidden page isn't being displayed rather the generic Apache page displays....


If I use the following it works but how do I specify my single andrewspress.com domain?

<Location />
<Limit GET POST PUT>
order allow,deny
allow from all
deny from 10.2.2.126
</Limit>
</Location>
 
Last edited:
Back
Top Bottom