Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
9  
MEEP MEEP MEEP MEEEP SNAKE OIL DETECTED ON LINKED WEBSITE! –  Tom O'Connor Nov 6 '12 at 13:26
add comment

migrated from stackoverflow.com Nov 6 '12 at 9:34

This question came from our site for professional and enthusiast programmers.

1 Answer

You should try to remove the www. prefix.

To avoid the need for trivial rewrites, G-WAN translates www.domain requests into domain requests so there's no need to specify www. explicitely.

If you REALLY need to use distinct sites for www.domain and domain 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.

share|improve this answer
1  
...stupid question, but what if I want www.foo.com and foo.com to give different sites? (That's a pretty common use case.) –  voretaq7 Nov 6 '12 at 13:41
7  
@voretaq7 GWAN isn't designed to be a robust webserver, it's designed to perform exceptionally well in contrived and outlandish benchmarks, so PHBs will demand the IT team use it and buy support... –  Chris S Nov 6 '12 at 14:23
    
@ChrisS True I suppose, but it is possible to be performant and not brain damaged (nginx). I thought the IT world learned its lesson about sacrificing all in the name of performance with qmail and the rest of the djb family of things... –  voretaq7 Nov 6 '12 at 21:40
1  
G-WAN can support both www.domain and domain providing that you read the FAQs or the manual. –  Gil Nov 7 '12 at 7:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.