I want my Apache server to only serve requests that come from me (i.e. 127.0.0.1). I have tried the following:
# Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # Listen 127.0.0.1:80 Listen localhost:80 #Listen 80 # Default; works with this uncommented
I tried the two Listen entries above and the combinations of the two. It only works for me with the default entry.
I updated my virtual host like this:
<VirtualHost 127.0.0.1:80> # This works with *:80 when listening on all IP addresses ServerName work.dev DocumentRoot "/my/path" <Directory "/my/path"> DirectoryIndex index.php Options FollowSymLinks Indexes AllowOverride All Order deny,allow allow from All </Directory> </VirtualHost>
Does anyone know what I am doing wrong? Yes, I have restarted the Apache server. Thanks!
I am using OS X 10.8's built in Apache server.
Edited by Andy123, 28 November 2012 - 08:59 AM.