I am very new to this area, so please bear with me. 🙂
Right now I am running an Apache HTTP server on my setup, a very basic configuration. The website hosted on it is accessible from anywhere, and I want to limit the access to a specific IP address range.
I've looked into this and I found that one Apache module called mod_authz_host handles this.
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
The problem is, I haven't managed to find documentation that explains well how to actually do the stuff. How do I actually make sure only a certain range of IP addresses can access my site/server?
The machine is running Ubuntu Server 10.10, the web files are stored in /var/www/, the apache2 daemon has its stuff stored in /etc/apache2/ and /usr/lib/apache2/modules/*. Thanks in advance, and sorry if this is a stupid question!
Best Answer
You just need to customise the following part in your apache2 config file:
/etc/apache2/sites-enabled/000-default
(if you are using the default configuration).For example, this will allow only the subnet
192.168.0.0/24
to access your web server.