Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reaching vhosts from lan behind firewall

Status
Not open for further replies.

bingoldsby

Technical User
Jan 24, 2002
68
US
Can someone please tell me how to reach both sites (vhosted) from a workstation on the lan that the server is also on. Just entering the internal IP address only gets one of the sites. Also I am running a dns nameserver on the same machine.

Thanks, Brian
 
Switch to name based addressing for the vhosts. That way they will all have the same ip address and port and will be resolved by their names.
 
Hi,

Just to emphasise on this... Name based virtual hosts work by the server examining the http headers for the called host and comparing that with the servernames in the various virtual host containers. If you just use the IP address there is nothing in the header to give apache a choice of which vhost to use.
The only way IP addresses (only) work with virtual hosts is with IP based virtual hosting. This is where you have a multi-homed server (or its using interface aliasing) such that there is more than one IP address. Then apache looks at the called IP address and compares that with the similarly labelled virtual host containers in httpd.conf to make a choice.
If you only have one IP address then you must use name based virtual hosts.

Hope this helps
 
Ok. So I'm still right at the start. I am using name-based virtual hosting. I was hoping that because I also have a primary dns server running, and on the same machine even, there might be a way for it to suggest the name to the Apache by reverse IP... something or other.

In spite of this little problem, I can get to the sites in a couple of different ways. But I'm glad I'm not hosting 100 sites.

Thanks anyway, Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top