[supervisord] nodaemon=true [program:apache2] command=/usr/sbin/apache2ctl -D FOREGROUND autostart=true autorestart=true stdout_logfile=/var/log/supervisor/flask.log stderr_logfile=/var/log/supervisor/flask_err.log [program:flask] command=/bin/bash -c 'source /opt/myenv/bin/activate && FLASK_APP=/var/www/html/moodle/api.py /opt/myenv/bin/flask run --host=0.0.0.0' directory=/var/www/html/moodle autostart=true autorestart=true stdout_logfile=/var/log/supervisor/moodle.log stderr_logfile=/var/log/supervisor/moodle_err.log