I have apache2 on my Mac OS X Lion box with name-based virtual hosting turned on.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName my.puter.edu
DocumentRoot "/path/to/Sites"
<Directory "/path/to/Sites">
...
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName foo.local
ProxyPass / http://127.0.0.1:25012/
ProxyPassReverse / http://127.0.0.1:25012/
</VirtualHost>
<VirtualHost *:80>
ServerName bar.local
ProxyPass / http://127.0.0.1:25013/
ProxyPassReverse / http://127.0.0.1:25013/
</VirtualHost>
My /etc/hosts
file has the following entries
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 foo.local
127.0.0.1 bar.local
184.72.115.86 search.yahoo.com
From the command line I can successfully ping my.puter.edu
, ping foo.local
, and ping bar.local
. But from the browser I can only reach http://my.puter.edu. The browser is unable to establish a connection to foo.local and bar.local.
Suggestions?
local.
. You don't own that domain name. As a MacOS 10 user, you should be even more aware of this than most people are. It has been well-known in the Apple world for ten years.