I'm trying to move away from nasty daemons that write config files and need root access to operate.
I want to store vhosts/domains in an MySQL database, ideally with restricted access. I'm looking for some modules that will be able to dynamically generate vhost config retrieving them using queries.
Some of what I found, and why I can't use it:
- mod_sqltemplate - Exactly what I was looking for, until I realized it needs httpd reload when new vhosts are inserted to the database (meaning an external script/passwordless sudo/nasty daemons/etc)
- mod_sqlinclude - Looks the same as the above, but it's apache1.3 only. I also don't know if it requires httpd reload when new entries are inserted. I tried porting this myself and ended up one function behind.
- mod_vdbh - I can't find any info on that one, but it has some references that shows that is might what I'm looking for
- mod_shapvh - apache1.x only, failed to port it.
It would also be nice if there's a way to read/write bandwidth limit counters into MySQL.
Running on Debian GNU/Linux.
AFAIK there is no way to add virtual hosts to Apache without restarting it.
You might be interested in mod_vhost_alias.
FreeBSD hosts the patch for the mod_vdbh module: link
I don't know if apache really handles this well, without restarting the server. When I hosted my vhosts with lighttpd it required reboots to refresh the vhosts.