Files
Jeremy Graham d538cf09d4 fix: start Apache with apache2-foreground under Supervisor (#217)
apachectl reads /var/run/apache2/apache2.pid. After an unclean restart another
process can reuse the old PID, and apachectl then exits 0 without starting
Apache. apache2-foreground removes the stale PID file first. Supervisor now
also restarts Apache if it exits.
2026-10-06 16:37:48 +11:00

35 lines
813 B
Plaintext
Executable File

[supervisord]
nodaemon = true
logfile = /dev/null
logfile_maxbytes = 0
pidfile = /run/supervisord.pid
[program:apache2]
; apache2-foreground removes a stale PID file before it starts Apache. apachectl
; reads that file, and when another process reuses the old PID it exits 0 without
; starting Apache (#217).
command=/usr/local/bin/apache2-foreground
redirect_stderr=true
autostart=true
autorestart=true
[program:cron]
command = /start-cron.sh
stdout_logfile = /var/log/cron.log
stdout_logfile_maxbytes=0
stderr_logfile = /var/log/cron.log
stderr_logfile_maxbytes=0
user = root
autostart = true
autorestart = true
priority = 20
[program:queue-worker]
command=php artisan queue:work
autostart = true
autorestart = true
priority = 30
redirect_stderr = true
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0