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?
It could be the problem of proxy behind apache that you are using for foo.local and bar.local as per your configuration
What are running behind 25012 port (Are they actually running or not ?) ? Have you checked apache logs ? Browser error output can not match the verbosity of log files when debugging.