perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Maas <>
Subject Re: How to restart the root server from within modperl?
Date Tue, 12 Aug 2003 10:04:10 GMT
On Tue, Aug 12, 2003 at 11:50:01AM +0200, Dirk Lutzebaeck wrote:
> Dennis Stout writes:
>  > On a whim, I would try writing a second script to do the actual shutdown and
>  > restart of Apache.
>  > 
>  > Then have your mod_perl program either run it in the background (with a &)
>  > fork it into another process.
> Did exactly that but is has the effect that when the parent (root)
> apache is killed it kills all children including the script itself. So
> the server wont start again.

Since you are talking about a management tool via http, you might consider
using a second server process for this. If you select the 'restart link'
then under water you need to (a) startup a server on a different port,
(b) redirect to a URI on that server, (c) make it that that URI restarts
the main server as you would normally do, (d) clean up the second server
as soon as the main server restarts.
You can do this in a sophisticated manner by creating a httpd config on
the fly, using a unique restart-URI, thus avoiding the most obvious 
security risks.

Might work...


View raw message