Dynamic apache config

Brian lists at karas.net
Tue Jun 3 18:24:17 EDT 2003


On Tue, 2003-06-03 at 16:16, Cole Tuininga wrote:

> I'm looking for a little more magic with a little less regenerating
> httpd.conf.  *grin*
> 

Given that you're using 1.3 (not that 2.0 is light years ahead in this
regard...) I don't think you're going to get much "magic" in terms of
httpd.conf.  It's read when the daemon is loaded, so you won't be able
to add virtual sites "on the fly" (which I'm pretty sure you already
knew).

> What I'm looking for is some kind of module that will let me put
> (something like) the following in my httpd.conf:
> 
> <DynVirtHosts>
> 	mysqlhost hostname
> 	mysqldb dbname
> 	mysqluser username
> 	mysqltable tablename
> </DynVirtHosts>
> 
> Then, the table in the database would have a row (or some such
> structure) for the data necessary for each virt host.  This way, all I
> need to do to add a vhost would be to add a row in the database.
> 
> Am I making sense?
> 

I see what you're after, and my best suggestion is to do something
similar to what I did for managing RADIUS accounts: put 'em in the
database, generate a config file every X minutes (in my case 5 minutes)
and hup the daemon at scheduled intervals or scriptmatically when the
new config file varies from the operating config file.
-- 
Brian Karas - brian at karas.net
There are only 10 kinds of people in the world.
Those that understand binary.  And those that don't.




More information about the gnhlug-discuss mailing list