[SLUG] IP-based virtual hosting with apache

From: Greg Schmidt (slugmail@gschmidt.net)
Date: Fri Mar 28 2003 - 01:15:49 EST


So I'm trying to figure out how to do virtual hosting with Apache. It
can't be named-based virtual hosting because I want to use SSL. It has
to be IP-based. From what I've read of Apache docs so far there are two
ways to do IP-based virtual hosting. One way uses the same httpd and
httpd.conf for each IP address. The other way is to run multiple http
daemons. It seems that running multiple daemons has some security
advantages. I want to know how to do it that way. The docs say:

"Create a separate httpd installation for each virtual host. For each
installation, use the Listen directive in the configuration file to
select which IP address (or virtual host) that daemon services."

My question is, by "create a separate httpd installation" do they simply
mean loading the httpd daemon with the -f flag to tell it to use a
unique /etc/httpd/conf/httpd.<this domain>.conf? I'm thinking that
config file would, for each domain, need to specify unique document
roots, unique httpd.pid files, unique Listen directives for each IP
addy, unique log files, (What else am I forgetting?) etc.

Can I do this by simply having my rc scripts load httpd multiple times
with one config file for each virtual domain? Can I make renamed copies
of the httpd file to track each virtual domain's httpd process by name
instead of pid? Am I heading in the right direction here?

Side note: Layer 8 issues preclude UML for virtual hosting.

Thanks,

Greg



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:20:58 EDT