Forum OpenACS Q&A: Virtual Hosting

Collapse
11: Virtual Hosting (response to 1)
Posted by Vinod Kurup on
But what is the best way to handle virtual hosting for multiple sites on the same server box?

Hey Stan,

AOLserver 4 does have virtual hosting built-in but pound is more flexible. You can stop/start individual servers and it gives you the option of running non-AOLserver web servers if you want 😊

Built-in AOLserver virtual hosting instructions are here: http://panoptic.com/wiki/aolserver/Virtual_Hosting

If you want to use pound, it's pretty simple to set up. My /etc/pound/pound.cfg file looks something like this:

...

ListenHTTP
  Address     66.98.222.124
  Port        80
  xHTTP       0
  WebDAV      0
  Change30x   1
End

Service
  HeadRequire "Host:.*kurup.org.*"
  # make sure not to match other servers
  HeadDeny    "Host:.*dev.kurup.org.*"
  BackEnd
    Address   127.0.0.1
    Port      8001
  End
  Session
    Type      COOKIE
    ID        "ad_session_id"
    TTL       1800
  End
End
...
Collapse
12: Re: Virtual Hosting (response to 11)
Posted by Stan Kaufman on
Many thanks for the pointers, Vinod! I had planned to emerge scratching and yawning from the Dark Ages of 3.2.5/3.3.1+ad13/nsunix into the Glorious Dawn of 5.x/4.0.10/pound, but this situation (even though I'm not certain I'm afflicted) has put a pointed boot to my backside to hasten me along.
Collapse
13: Re: Virtual Hosting (response to 11)
Posted by Tracy Adams on
Also, if you want to have different domains and have ssl on each one, AOLServer with virtual hosting will not handle it.

As I understand it, the domain name in the http request will be encrypted, so AOLServer will not know which ssl certificate to present.

Pound can help you do this as well (haven't tried it but so I've read)