Jorge Godoy wrote:
What if both "zope.server.com" and "turbogears.server.com" were just
"server.com" and the only difference on the decision was the port the user
connected to (either 80 for Zope or 443 for TG)?
Not a problem, you'd simply run *two* copies of Pound, one on port 80,
one on 443.
/etc/pound/pound-http.conf:
ListenHTTP 1.2.3.4,80
UrlGroup ".*"
HeadRequire Host ".*server.com.*"
BackEnd 127.0.0.1,8088,1
EndGroup
/etc/pound/pound-https.conf
ListenHTTPS 1.2.3.4,443 /etc/pound/certs/server.com.pem
UrlGroup ".*"
HeadRequire Host ".*server.com.*"
BackEnd 127.0.0.1,8080,1
EndGroup
Then just issue:
pound -f /etc/pound/pound-http.conf
pound -f /etc/pound/pound-https.conf
While this may seem more complicated than running a monolithic Apache
instance that "does it all", I personally find it much simpler to run
discrete services (and Pound is extremely small and fast).
Also, note that you can use a HeadRequire on *any* HTTP header, not just
Host.
On my test server I have a few sites, pure HTML, PHP, TG and Zope. All behind
Apache. So, when I have to mix two technologies, my first choice is using
Apache -- that's what I know and use here... ;-) It might not be the best,
though.
I'd argue that mixing several simple technologies is usually simpler
than having a single monolithic complicated one. I'd bet that all of my
lighttpd.conf files concatenated together aren't as long as the default
httpd.conf that Apache ships with ;-) Don't get me wrong: Apache does
*do* more things than Lighttpd, however, I find that most of those
things aren't things that are used in 80% of environments.
Regards,
Cliff