3

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

  • 12
    MEEP MEEP MEEP MEEEP SNAKE OIL DETECTED ON LINKED WEBSITE! – Tom O'Connor Nov 06 '12 at 13:26
  • You can find Tom Connor's ranting 'review' here: http://tomoconnor.eu/blogish/gwan-snakeoil-beware. It's basically nothing on G-WAN, but a whole opinion piece on him not being able to create a working C script and giving up. Still waiting for a review somewhere. Anyone? – oligofren Jul 14 '15 at 12:28

1 Answers1

2

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.

Gil
  • 307
  • 3
  • 12
  • 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 06 '12 at 13:41
  • 11
    @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 06 '12 at 14:23
  • 2
    @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 06 '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 07 '12 at 07:45