Apache on Localhost to block incoming connections outside localhost

Solution 1:

Could try:
order deny,allow
allow from 127.0.0.1
deny from all

in a .htaccess file. - I use a similar setup to allow an external website to allow all access from our office IP, but ask for a password from any other.

Solution 2:

Change your current "Listen" line to "Listen 127.0.0.1:80"

http://httpd.apache.org/docs/current/mod/mpm_common.html#listen

Solution 3:

The easiest way would be to block ports 80 and 443 in the firewall for the machine that is hosting Apache. This would make external requests get blocked at the firewall.