Discussion:
[Supervisor-users] apache2 problems
Marcos Cano
2013-11-08 18:12:06 UTC
Permalink
hello im running in a problem trying to run apache2, idk if this is a
supervisor issue or an apache2 issue.

1) our apache2 isntallation seems to be from package (ubuntu 10.04) and not
from source.

2) there's no httpd daemon (as i used to run apache like this: )

[program:apache]
command=/usr/local/apache2/bin/*httpd *-DFOREGROUND -c "ErrorLog
/dev/stdout"

instead of that under the /usr/sbin/ we have
apache2 apache2ctl apachectl

3) it appears that the binary is apache2 and that apache2ctl and apachectl
call the binary, and also apache2ctl and apachectl can receive the same
arguments as httpd so the -D FOREGROUND problem is fixed.

4) i can not run apache2 (which is the binary) because according to
documentation:

The binary is called apache2. Due to the use of environment variables, in
the default configuration, apache2 needs to be started/stopped with
/etc/init.d/apache2 or apache2ctl

so i have to run apache2ctl which in my case an executable script with the
#!/bin/bash line so whenever i try to run apache from supervisor

[program:apache]
command=/usr/sbin/apache2ctl -D FOREGROUND

i loose control over it because of the script

root 25087 /bin/sh /usr/sbin/apache2ctl -D FOREGROUND
root 25088 /usr/sbin/apache2 -D FOREGROUND


the 25087 is the one under supervisor. but not 25088

What can i do?


PD: i know some EXEC should do the trick but as you can imagine these
scripts are very complex

Loading...