Webhosting made difficult

You’d think Apache’s mass domain support would make it easy to host a group of websites, some of which are owned by various different groups.

For example, I’d expect such support to work in the following style:

VirtualHost *:80

<VirtualHost *:80>
ServerName Override.tbble.net
# Blah here... DAV support or something...

<MassVirtualHost *:80>
DocumentRoot /var/www/%2-/%1
# or even "DocumentRoot /var/www/*/%2-/%1" if I could be so lucky....
ServerAdmin webmaster@%2-
php_admin_value open_basedir /var/www/%2-/
ErrorLog /var/log/apache/%2/%0_error.log
CustomLog /var/log/apache/%2/%0_access.log

Which is to say, a MassVirtualHost tag which interpolates the requested Host into its arguments, and if DocumentRoot comes out sensibly, returns it. It’d have to come at the end, since Apache takes the first VirtualHost hit it matches, and obviously MassVirtualHost will match anything… (Unless you also allow some syntax for denying??? Oooh, there’s a thought)

OK, I realise Apache 1 doesn’t do this, but I’d have thought by the time they developed Apache2, someone would have noticed this deficiency….

Anyway, the Apache (both 1 and 2!!!) mass virtual domain support lets you interpolate two values… DocumentRoot and ScriptAlias. I mean, really! You can’t even make ServerAdmin default to something sensible… Actually I suspect it does anyway, as long as by sensible I mean webmaster@host….

I wonder if now’s a good time to look at the Apache2 source, and see if it’s even possible to get something like this implemented…

Or maybe over Christmas?

One thought on “Webhosting made difficult

  1. Just a thought on this, rereading my own blog…
    I should have included ServerAlias in this example, since I’d want most mass hosts to include something like
    ServerAlias *.%2-

    Alternatively, some kind of database support would be good. For my purposes, I could tie it into the rest of the customer support database structure I’ve cobbled together.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s