D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Apache Web Hosting Automation

 

On 25/01/11 20:03, Gibbs wrote:
> 
> Does, say, a web hosting company manually set up websites on Apache or
> is it common to take an "automated" approach like I'm trying to achieve?
> It just seems a bit laborious having to manually configure everything
> and be needed to do it :)

We build all the hosting from our accounts database with a script I
wrote which is run after the database is changed.

It basically creates any websites, databases, or users that are missing
and complains about things that are wrong, or additional to the accounts
database (if it isn't paid for it shouldn't exist). It also spots any
"SSL certs" and gets the IP from the database for that users website.
Another script creates virtual mailboxes since mail users really
shouldn't have corresponding system accounts.

In our environment there are only a few hundreds of websites, and since
we created quite a lot of them, we may have some clever customisations
either in the Apache config, or elsewhere. But it still saves a lot of
messing about to have the basics done automatically.

Being a debian person I build the Apache config in the style that Debian
would do /etc/apache2/sites-available/[filename], but this is only good
for a few hundred virtual hosts, you need to get cleverer for really big
hosting needs.

Steve Kemp has a utility at Bytemark, Symbiosis, which does this sort of
thing which might be worth looking at if you are doing it a lot.
Basically creating folders in Symbiosis will create a virtual host, or a
mailbox with the corresponding name.

I dare say there is a standard CPANEL way of doing all this, which many
ISPs will use. You may not want to go there though.

 Simon

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq