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.

link|improve this question

60% accept rate
What OS are you running this on? From a google search of mod_vdbh, I see that it is in portage for Gentoo currently. – Dave Rickman Aug 12 '09 at 9:25
feedback

3 Answers

AFAIK there is no way to add virtual hosts to Apache without restarting it.

link|improve this answer
This blog post begs to differ - revjim.net/2003/08/14/mod_vdbh-for-apache – LiraNuna Aug 12 '09 at 8:56
Yes. And it also links directly to a 404. – innaM Aug 13 '09 at 10:01
feedback

You might be interested in mod_vhost_alias.

link|improve this answer
I don't understand how the module connects to a MySQL server? I want configurations stored completely in a database and not in configuration files. – LiraNuna Aug 12 '09 at 9:08
1  
It doesn't. What I was hinting at was that there might be a more efficient solution than storing and sourcing the vhost details from MySQL. Databases are great for some things, but others not so. – Dan Carley Aug 12 '09 at 10:45
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.