As a webdeveloper I have an Apache server running on my local machine which I use for developing. The server is listening on every IP address on port 80 as per default. However I've used the httpd.conf to control who can access the server and that's basically me and everyone else on the LAN, no outside access is permitted.
I also have some virtual-hosts configured. Something like this goes on httpd-vhosts.conf file:
NameVirtualHost localhost:80
<VirtualHost localhost:80>
DocumentRoot "C:\Users\Nazgulled\Workspace\Htdocs\Project1"
ServerName project1.domain.com
</VirtualHost>
On my local machine I access this project website by navigating to project1.domain.com (the same address is pointing to 127.0.0.1 in the hosts file).
On the VMware guest I can easily point to the host's IP address (using NAT as it works better/faster for me) and access the root of the web server, but I can't manage to access the project website navigating to project1.domain.com. I tried to point that address to the hosts's IP address in the hosts file (just like I did in the local machine but with a different address) but it didn't work.
The one thing I tried was to replace localhost:80 by *:80 but it didn't seem to have any effect.
I have no other ideas how can I make this work, suggestions?
Suggestions:
You are right, you need to change localhost:80 to *:80.
Add ErrorLog and CustomLog to that VirtualHost and check if it provides any useful information.
To debug try:
This should give you at least an error message from Apache.
If curl times out then you probably have a general network issue.