httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Monkey Daemon <>
Subject Re: [users@httpd] Zeus Subserver Equivalent in Apache2?
Date Mon, 29 Jun 2009 16:05:46 GMT
2009/6/29 Mike Cardwell <>
> Monkey Daemon wrote:
>> I'm looking into our options going forward for our web-hosting cluster.
>> We're currently running Zeus Web Server using sub servers.
>> The idea behind webservers is that you can have a directory layout that looks like:
>> /var/www/%HOSTING-PACKAGE-TYPE%/%x%/%x%/%domain-name.tld/html/
>> and the webserver does a lookup for the files in the html directory for each request
it recieves.  In the above example, that would mean that for <>
[0] hosted on a Designer Hosting package, the path would expand to
>> /var/www/DesignerHosting/i/c/ <>
>> I know that you can do a similar thing with vhosts, however we need to be able to
set different options for each of our hosting packages and I don't appear to be able to specify
the package-type restrictions, just server wide which is no good for our hosting platform.
>> If someone can point me in the direction of the correct module(s) to use for this,
I'd be very greatful.
> I set up a system very similar to what you're describing in a past job. I used mod_rewrites
RewriteMap option with the "prg" MapType.
> iirc we used suphp to make the perl/php scripts run as the owner of the file.
> What differences are there between your different hosting packages that would require
vhost level configuration? Perhaps you could set up one virtualhost for each hosting package
and stick them on different IPs?

We host over 160,000 sites, I'm not sure if it's a good idea to host
that number across about 4 vhosts (that is the number of hosting
packages we provide!) :)

The main issue that we face is that vhost_alias does not return the
correct document root as a server variable under PHP and we don't want
to end up with a huge number of mod_reqrite rules just to get the
system running...although I do realise that it may well be a trade-off

As an example, a file at
/var/www/DesignerHosting/e/x/ with a simple
"echo $_SERVER['DOCUMENT_ROOT']" statement in it will echo the
ServerRoot as set in apache2's httpd.conf (or equivalent depending on
Operating System!) instead of the VirtualDocumentRoot which is set to
/var/www/DesignerHosting/%1.1/%1.2/%1+/html and should expand to
/var/www/DesignerHosting/e/x/ (provided the syntax is

The packages work as follows:

Basic: Static HTML,
Legacy: PHP4/mySQL4
Hosting: php5/MySQL5
Designer: php5/Hosting5 but with ability for reselling/sub-domains etc.

So any site that is hosted on the basic offering needs to have
PHP/MySQL switched off, the others need it switched on and the
Reseller account needs to be able to setup sub domains.

>> [0] Sadly this domain is not hosted with us, but it seemed like a good example domain
to use!
> According to RFC 2606 it's best practice to use one of the following domains when you
need examples:
> See for more information.

Duely noted, I'll use this in future.

Kind regards,


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message