1

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.

LiraNuna
  • 291
  • 2
  • 16

3 Answers3

2

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

innaM
  • 1,428
  • 9
  • 9
0

You might be interested in mod_vhost_alias.

Dan Carley
  • 25,189
  • 5
  • 52
  • 70
  • 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 09: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
0

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.

David Rickman
  • 3,290
  • 17
  • 16