Re: Can an Apache module inject configuration in runtime?

2010-06-01 Thread Ben Noordhuis
On Tue, Jun 1, 2010 at 11:39, Andrew Godziuk and...@cloudaccess.net wrote:
 What I want to achieve is injecting new vhosts without Apache restart.
 Of course I'm aware that the changes would fully take effect after all
 workers have recycled, but for me - it's still better than a restart.

Andrew, wouldn't you be better off with something like
mod_vhost_alias, as-is or as leitmotiv? Propagating configuration
changes to all workers is rather difficult, especially with pre-fork
MPMs.


Re: Can an Apache module inject configuration in runtime?

2010-06-01 Thread Andrew Godziuk
On Tue, Jun 1, 2010 at 11:51 AM, Ben Noordhuis i...@bnoordhuis.nl wrote:
 Andrew, wouldn't you be better off with something like
 mod_vhost_alias, as-is or as leitmotiv? Propagating configuration
 changes to all workers is rather difficult, especially with pre-fork
 MPMs.


Unfortunately, I need some suexec mechanism, currently I'm using
mpm_itk, so I need some per-vhost settings, it's not available with
mod_vhost_alias style dispatch-time modules. At least, as far as I
understand how they work.


-- 
Andrew


Re: Can an Apache module inject configuration in runtime?

2010-06-01 Thread Nick Kew

On 1 Jun 2010, at 10:39, Andrew Godziuk wrote:

 I'm wondering if it's possible for an Apache module to change global
 config structures.

Basically, no, not without a restart.  Though there are some aspects of
configuration you can change on the fly.

 What I want to achieve is injecting new vhosts without Apache restart.
 Of course I'm aware that the changes would fully take effect after all
 workers have recycled, but for me - it's still better than a restart.

There are some similar modules around.  Someone already said
mod_vhost_alias, but I'd also point you at mod_vhost_dbd as an
example that may be nearer to what you want if your needs are
sufficiently complex to demand a new module.

-- 
Nick Kew


Can an Apache module inject configuration in runtime?

2010-06-01 Thread Andrew Godziuk
Hi,

First of all, hi to the Apache developers, I'm new to this list - nice
to meet you all.

I'm wondering if it's possible for an Apache module to change global
config structures.

What I want to achieve is injecting new vhosts without Apache restart.
Of course I'm aware that the changes would fully take effect after all
workers have recycled, but for me - it's still better than a restart.

I've written an Apache module before, but the configuration is an
unknown land to me. While reading config.c, I noticed that a function
called ap_build_config() could be helpful, but how do I call it to do
what I need? Is it at all possible?

-- 
Andrew