The idea about starting your services under Supervisor’s supervision is to be able to run multiple services under a single daemon. Depending on the Supervisor’s configuration it will be able to start,stop or restart any given service as a child process. In this config we show how to run
apache2 as supervised service ( useful for docker images etc. ) on Ubuntu/Debian Linux.
First, install supervisor:
# apt-get install supervisor
apache2‘s supervisor configuration into
/etc/supervisor/conf.d/. Supervisor will pick any configuration files from this directory where the only requirement is
*.conf file extension. For example insert a following lines into a new file
[program:apache2] command=/usr/sbin/apache2ctl -DFOREGROUND