LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache2.conf - Deny from ... (https://www.linuxquestions.org/questions/linux-server-73/apache2-conf-deny-from-670138/)

lothario 09-15-2008 06:32 PM

apache2.conf - Deny from ...
 
In "/etc/apache2/apache2.conf" I just added:


Code:

<Directory "/var/www">

Order Allow,Deny

Deny from 192.168.8.34

Allow from all

</Directory>

Then I re-booted the server.
But I am still able to access the files under /var/www from the 192.168.8.34 client.

What am I missing?

I want to block 192.168.8.34 completely from accessing any page on this web server.

estabroo 09-15-2008 07:38 PM

You need to switch your order, since you Allow first and Allow allows All, everyone gets in.
Order Deny,Allow

John VV 09-15-2008 09:07 PM

rewright
Code:

<Directory "/var/www">

Order Allow , Deny

Allow from all

Deny from 192.168.8.34

</Directory>

this will work .This is how i block irritating ip's
on the front page of my old web site
( BIG unfriendly letters " Do Not Use A Download Manager -- You Will Be Banned " )


All times are GMT -5. The time now is 03:27 AM.