Hi everyone, I am new here... unfortunately i'm also quite new to linux and apache... I know that I use the Deny directive in the httpd.conf file to deny access to certain IP addresses, but where do I put this within that file?? Thank you
You just put a couple of lines into either a <Directory> container within httpd.conf for the directory concerned, or a .htaccess file placed in the directory itself. For example :
<Directory /whatever>
order deny,allow (the default order)
allow from 192.168.0.0/255.255.255.0
deny from all
</Directory>
[only allows from the 192.168.0.x subnet]
<Directory /whatever>
order allow,deny
deny 192.168.0.1
allow from all
</Directory>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.