You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Simon Matthews <sa...@knowledgepool.com> on 2005/04/06 22:58:56 UTC

General mod_perl httpd configuration question

I have a number of applications built around mod_perl 1.0 and I am
considering porting these over to 2.0.

One of the questions that has come up here recently is can mod_perl modify
the httpd configuration dynamically after server startup.  

We currently build the server configuration from entries in a sql database
which means that we can add customer specific sites by configuring entries
in our database.  The benefit of this approach is that we are not having to
do dynamic calls for all pages.  However it does mean that we have to
restart the server when we want a new part of the site available.  I have
considered using a hybrid approach of static configuration on server startup
and dynamic for anything that is created after startup.  It would be great
if I could effectively create a /Location or /Alias entry dynamically
through perl code.  Is this possible in either 1.0 or 2.0. 

S

Re: General mod_perl httpd configuration question

Posted by Perrin Harkins <pe...@elem.com>.
On Thu, 2005-04-07 at 13:13 -0500, Frank Wiles wrote:
>   I read it as he needed a way to configure Apache via Perl at
>   startup, not on the fly.  Based on his original post I think they are
>   using code to generate a httpd.conf and restarting.

I suppose Simon can speak for himself, but I read it as a desire to
avoid restarting.  I don't think that's possible with the existing
mod_perl API.

- Perrin


Re: General mod_perl httpd configuration question

Posted by Frank Wiles <fr...@wiles.org>.
On Thu, 07 Apr 2005 12:19:22 -0400
Perrin Harkins <pe...@elem.com> wrote:

> On Thu, 2005-04-07 at 10:16 -0400, Stas Bekman wrote:
> > >   Yes this is possible with both versions.  I couldn't find any
> > >   2.0 specific docs on this, but here is the relevant section of
> > >   the 1.0 docs: 
> > >  
> > > http://perl.apache.org/docs/1.0/guide/config.html#Apache_Configuration_in_Perl
> > 
> > mp2.0:
> > http://perl.apache.org/docs/2.0/user/config/config.html#C_E_lt_PerlE_gt___Sections
> 
> Does this really let you modify Location and Alias settings in a
> server that has already finished starting up?  That's what the OP was
> asking about.
> 
> - Perrin
> 

  I read it as he needed a way to configure Apache via Perl at
  startup, not on the fly.  Based on his original post I think they are
  using code to generate a httpd.conf and restarting.  

 ---------------------------------
   Frank Wiles <fr...@wiles.org>
   http://www.wiles.org
 ---------------------------------


Re: General mod_perl httpd configuration question

Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
> On Thu, 2005-04-07 at 10:16 -0400, Stas Bekman wrote:
> 
>>>  Yes this is possible with both versions.  I couldn't find any 2.0
>>>  specific docs on this, but here is the relevant section of the
>>>  1.0 docs: 
>>> 
>>>http://perl.apache.org/docs/1.0/guide/config.html#Apache_Configuration_in_Perl
>>
>>mp2.0:
>>http://perl.apache.org/docs/2.0/user/config/config.html#C_E_lt_PerlE_gt___Sections
> 
> 
> Does this really let you modify Location and Alias settings in a server
> that has already finished starting up?  That's what the OP was asking
> about.

Well, I just followed up on Frank response, saying he couldn't find the 
2.0 link.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: General mod_perl httpd configuration question

Posted by Perrin Harkins <pe...@elem.com>.
On Thu, 2005-04-07 at 10:16 -0400, Stas Bekman wrote:
> >   Yes this is possible with both versions.  I couldn't find any 2.0
> >   specific docs on this, but here is the relevant section of the
> >   1.0 docs: 
> >  
> > http://perl.apache.org/docs/1.0/guide/config.html#Apache_Configuration_in_Perl
> 
> mp2.0:
> http://perl.apache.org/docs/2.0/user/config/config.html#C_E_lt_PerlE_gt___Sections

Does this really let you modify Location and Alias settings in a server
that has already finished starting up?  That's what the OP was asking
about.

- Perrin


Re: General mod_perl httpd configuration question

Posted by Stas Bekman <st...@stason.org>.
Frank Wiles wrote:
> On Wed, 6 Apr 2005 21:58:56 +0100 
> Simon Matthews <sa...@knowledgepool.com> wrote:
> 
> 
>>I have a number of applications built around mod_perl 1.0 and I am
>>considering porting these over to 2.0.
>>
>>One of the questions that has come up here recently is can mod_perl
>>modify the httpd configuration dynamically after server startup.  
>>
>>We currently build the server configuration from entries in a sql
>>database which means that we can add customer specific sites by
>>configuring entries in our database.  The benefit of this approach is
>>that we are not having to do dynamic calls for all pages.  However it
>>does mean that we have to restart the server when we want a new part
>>of the site available.  I have considered using a hybrid approach of
>>static configuration on server startup and dynamic for anything that
>>is created after startup.  It would be great if I could effectively
>>create a /Location or /Alias entry dynamically through perl code.  Is
>>this possible in either 1.0 or 2.0. 
> 
> 
>   Yes this is possible with both versions.  I couldn't find any 2.0
>   specific docs on this, but here is the relevant section of the
>   1.0 docs: 
>  
> http://perl.apache.org/docs/1.0/guide/config.html#Apache_Configuration_in_Perl

mp2.0:
http://perl.apache.org/docs/2.0/user/config/config.html#C_E_lt_PerlE_gt___Sections

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: General mod_perl httpd configuration question

Posted by Frank Wiles <fr...@wiles.org>.
On Wed, 6 Apr 2005 21:58:56 +0100 
Simon Matthews <sa...@knowledgepool.com> wrote:

> 
> I have a number of applications built around mod_perl 1.0 and I am
> considering porting these over to 2.0.
> 
> One of the questions that has come up here recently is can mod_perl
> modify the httpd configuration dynamically after server startup.  
> 
> We currently build the server configuration from entries in a sql
> database which means that we can add customer specific sites by
> configuring entries in our database.  The benefit of this approach is
> that we are not having to do dynamic calls for all pages.  However it
> does mean that we have to restart the server when we want a new part
> of the site available.  I have considered using a hybrid approach of
> static configuration on server startup and dynamic for anything that
> is created after startup.  It would be great if I could effectively
> create a /Location or /Alias entry dynamically through perl code.  Is
> this possible in either 1.0 or 2.0. 

  Yes this is possible with both versions.  I couldn't find any 2.0
  specific docs on this, but here is the relevant section of the
  1.0 docs: 
 
http://perl.apache.org/docs/1.0/guide/config.html#Apache_Configuration_in_Perl

 ---------------------------------
   Frank Wiles <fr...@wiles.org>
   http://www.wiles.org
 ---------------------------------