Hi Cyrus,
Quoth Cyrus Harmon ch-tbnl@bobobeach.com:
I'm happy to abandon my hunchentoot-vhost approach if there's a better option, but I'd hate to have to recode that stuff for no good reason. Any suggestions?
At one point I considered hunchentoot-vhost but decided against it. It seemed quite complex (at least to me).
Instead, I run hunchentoot behind lighttpd. hunchentoot has acceptors listening on various localhost ports and lighttpd is configured to send page requests to one of those localhost ports depending on which host is identified in the URL.
And that's it! "One host per port". It works like a dream.
lighttpd's conf file needs a section that reads like this:
--8<---------------cut here---------------start------------->8--- # proxy handling server.modules += ( "mod_proxy" )
$SERVER["socket"] == "123.456.78.90:80" { proxy.balance = "fair" $HTTP["host"] =~ "^example.com" { proxy.server = ("" => (("host" => "127.0.0.1", "port" => 49154))) } $HTTP["host"] =~ "^foobar.org" { proxy.server = ("" => (("host" => "127.0.0.1", "port" => 49155))) } } --8<---------------cut here---------------end--------------->8---
I'm sure it's just as easy using Apache, but I'm afraid I've never used it so I can't say precisely how it's done.
Hope this helps,
Seb