You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hans Zaunere <ha...@nyphp.org> on 2002/12/18 18:14:29 UTC

[users@httpd] Program Execution during Apache Startup

Hello,

Is there a way in either 1.3.x or 2.0.x to have a program run when Apache
starts, or even stops?  I have some external software that I need to init
(and possibly shutdown) with Apache.

I know that I could hardcode something into bin/apachectl but I'd much rather
have it setable in httpd.conf (and even per virtual host, if possible).  The
closest directive I've been able to find is LoadFile, but this doesn't look
to be exactly what I need.

Ideally, I'd like to be able to run an external shell script (or even binary
if need be) on Apache startup (shutdown would be nice, but not nessecary).

Thank you,

Hans



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Program Execution during Apache Startup

Posted by Chris Taylor <ch...@x-bb.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Maybe a new Apache module would be easiest? mod_execute or something?

Have it read certain tasks from a database per VH....... I don't know
if this is possible (are there hooks for startup/shutdown in Apache?)
but it would be quite cool to see it done :)

HTH.

Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
http://www.x-bb.org/chris.asc

- ----- Original Message ----- 
From: "Hans Zaunere" <ha...@nyphp.org>
To: <us...@httpd.apache.org>
Sent: Wednesday, December 18, 2002 11:33 PM
Subject: Re: [users@httpd] Program Execution during Apache Startup


> 
> Hi Gary,
> 
> --- Gary Turner <kk...@sbcglobal.net> wrote:
> > Hans Zaunere wrote:
> > 
> > >
> > >Hello,
> > >
> > >Is there a way in either 1.3.x or 2.0.x to have a program run
> > >when Apache starts, or even stops?  I have some external
> > >software that I need to init (and possibly shutdown) with
> > >Apache.
> > >
> > >I know that I could hardcode something into bin/apachectl but
> > >I'd much 
> > rather
> > >have it setable in httpd.conf (and even per virtual host, if
> > >possible).  
> > The
> > >closest directive I've been able to find is LoadFile, but this
> > >doesn't 
> > look
> > >to be exactly what I need.
> > >
> > >Ideally, I'd like to be able to run an external shell script (or
> > >even 
> > binary
> > >if need be) on Apache startup (shutdown would be nice, but not
> > >nessecary). 
> > 
> > Just for the sake of starting the conversation,
> 
> Thank you :)
> 
> > couldn't you wrap this in a script? eg.:
> > 
> > dosomething && dosomethingelse && apachectl
> 
> Yeah, I could, but I'd like a easier to maintain and centralized
> configuration set.  I'm working on building an "application server"
> and need to run some external programs, specific to a virtual host.
>  If all else fails, then yes, I'd write a wrapper script to make
> the external calls, and then start apache, but I'd like to avoid
> that if possible.
> 
> Thank you,
> 
> 
> 
> =====
> Hans Zaunere
> New York PHP
> http://nyphp.org
> hans@nyphp.org
> 
> --------------------------------------------------------------------
> - The official User-To-User support forum of the Apache HTTP Server
> Project. See <URL:http://httpd.apache.org/userslist.html> for more
> info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPgEZ6iqf8lmE2RZkEQLWFQCg+mDjIO7jT9XL48nni4IY8grw0qUAnA70
M0vhEJ0tNfUdDZVqmCwFJoeu
=htnT
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Program Execution during Apache Startup

Posted by Hans Zaunere <ha...@nyphp.org>.
Hi Gary,

--- Gary Turner <kk...@sbcglobal.net> wrote:
> Hans Zaunere wrote:
> 
> >
> >Hello,
> >
> >Is there a way in either 1.3.x or 2.0.x to have a program run when Apache
> >starts, or even stops?  I have some external software that I need to init
> >(and possibly shutdown) with Apache.
> >
> >I know that I could hardcode something into bin/apachectl but I'd much
> rather
> >have it setable in httpd.conf (and even per virtual host, if possible). 
> The
> >closest directive I've been able to find is LoadFile, but this doesn't
> look
> >to be exactly what I need.
> >
> >Ideally, I'd like to be able to run an external shell script (or even
> binary
> >if need be) on Apache startup (shutdown would be nice, but not nessecary).
> 
> Just for the sake of starting the conversation,

Thank you :)

> couldn't you wrap this in a script? eg.:
> 
> 	dosomething && dosomethingelse && apachectl

Yeah, I could, but I'd like a easier to maintain and centralized
configuration set.  I'm working on building an "application server" and need
to run some external programs, specific to a virtual host.  If all else
fails, then yes, I'd write a wrapper script to make the external calls, and
then start apache, but I'd like to avoid that if possible.

Thank you,



=====
Hans Zaunere
New York PHP
http://nyphp.org
hans@nyphp.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Program Execution during Apache Startup

Posted by Gary Turner <kk...@sbcglobal.net>.
Hans Zaunere wrote:

>
>Hello,
>
>Is there a way in either 1.3.x or 2.0.x to have a program run when Apache
>starts, or even stops?  I have some external software that I need to init
>(and possibly shutdown) with Apache.
>
>I know that I could hardcode something into bin/apachectl but I'd much rather
>have it setable in httpd.conf (and even per virtual host, if possible).  The
>closest directive I've been able to find is LoadFile, but this doesn't look
>to be exactly what I need.
>
>Ideally, I'd like to be able to run an external shell script (or even binary
>if need be) on Apache startup (shutdown would be nice, but not nessecary).

Just for the sake of starting the conversation,  couldn't you wrap this
in a script? eg.:

	dosomething && dosomethingelse && apachectl


--
gt                  kk5st@sbcglobal.net
 If someone tells you---
 "I have a sense of humor, but that's not funny." 
                                  ---they don't.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org