Matt
Matt

Reputation: 11347

Make lighttpd load vhosts live?

My site lets people add their own vhost entries that all point to the same directory, but are handled differently by a PHP script. The domains are stored in a MySQL table and are loaded when lighttpd starts, by automatically running a python script referenced in the lighttpd config file.

But obviously when someone adds a new vhost, it only works after I manually restart lighttpd. Is there a way to make lighttpd check for new vhosts, or read them live?

I thought of making a script that checks periodically for new vhosts and restarts lighttpd when a change is detected, but that's probably a bad thing to do?

Upvotes: 0

Views: 169

Answers (1)

lifeofguenter
lifeofguenter

Reputation: 1181

there is already a module for that: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModMySQLVhost

Upvotes: 1

Related Questions