Thursday, August 11, 2011

Apache: Deny access from everyone, except your IP address

To block all visitors to access your website except your IP address and customers’. You can add  following codes at the end of httpd.conf file and restart your httpd.

# Deny access from everyone, except those IP listed here:
<Files *>
  Order deny,allow
  Deny from all
  Allow from xxx.xxx.xxx.xxx
  Allow from yyy.yyy.yyy.yyy
</Files>