httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Dyke <>
Subject Re: [users@httpd] Starting/Stopping Apache via an API
Date Mon, 19 Sep 2011 20:38:00 GMT
On Mon, Sep 19, 2011 at 2:07 PM, Tech Newbie <> wrote:
> I am aware of the way to start/stop Apache via apachectl, both locally and
> remotely via SSH.
> Is there some generic unix API, perhaps related to /sbin/service, that I can
> remotely programmatically start Apache without exec'ing apachectl directly?
> I'm thinking since Apache is already configured in /etc/init.d, is there a
> unix API that my program can interface with, that say something like:
>   // start Apache via some API
>   service.start("Apache");
> Without my program actually exec'ing apachectl directly?

All apachectl is doing is wrapping around httpd, so you want a wrapper
for the wrapper?  What is the ultimate intent.  There are different
interfaces into services (/etc/init.d) on different versions of linux,
Ubuntu is different on newer versions then it was on old ones (service
apache2 start vs /etc/init.d/apache2 start), though they both work.

Since i always compile apache2, i've found it easiest to allow work
with apachectl directly, that way the same commands work regards of
unix/linux variant.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message