Apache2 – Only allow localhost

To ensure that a local version of apache will only take local connections, and therefore deny any requests from external computers, you can edit the /etc/apache/httpd.conf file and change the line that says:

Listen 80

to…

Listen 127.0.0.1:80

Then restart apache: sudo /etc/init.d/apache2 restart

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: