I'm trying G-Wan v. 3.28 64 bits(on System: Ubuntu 12.04 64bits) to configure multiple domains on one IP address:
listener 1: / gwan / 192.168.2.4_80 / #192.168.2.4 (root host) / $www.domain1.com (virtual host) / $www.domain2.com (virtual host) / $www.domain3.com (virtual host)
I put example files on #192.168.2.4 and individual index.html on each domain "/www" folder.
When I browse to "http://www.domain1.com" , I keep seeing the "#192.168.2.4" and not the "$www.domain1.com".
All examples work from the distribution work.
What I'm doing wrong? Any idea?
Thanks
Ricardo
Best Answer
You should try to remove the
www.
prefix.To avoid the need for trivial rewrites, G-WAN translates
www.domain
requests intodomain
requests so there's no need to specifywww.
explicitely.If you REALLY need to use distinct sites for
www.domain
anddomain
then use a different IP address and G-WAN listener (G-WAN can listen to as many IP addresses as you wish, and a sngle NIC can have hundreds of IP addresses).G-WAN routes requests to a virtual host depending on the Host HTTP header; check what its value is when your request hits the server.