Skip to content

Instantly share code, notes, and snippets.

@wynemo
Created August 18, 2012 14:50
Show Gist options
  • Select an option

  • Save wynemo/3387206 to your computer and use it in GitHub Desktop.

Select an option

Save wynemo/3387206 to your computer and use it in GitHub Desktop.
supervisord.conf 8 18 backcup
[program:501fun]
command=/home/zdb/uwsgi-0.9.8.6/uwsgi
--uid zdb
-x /home/zdb/webpy_uwsgi.xml
--vhost
user=zdb
autostart=true
autorestart=true
stdout_logfile=/sites/501fun/logs/501funlog.log
stderr_logfile=/sites/501fun/logs/501funerr.log
stopsignal=QUIT
[program:501fun_blog]
command=/home/zdb/uwsgi-0.9.8.6/uwsgi
--uid zdb
-x /home/zdb/webpy_blog_uwsgi.xml
--vhost
user=zdb
autostart=true
autorestart=true
stdout_logfile=/sites/501fun/logs/501funbloglog.log
stderr_logfile=/sites/501fun/logs/501funblogerr.log
stopsignal=QUIT
[program:stunnel1]
command=/usr/local/bin/stunnel
/etc/stunnel/stunnel.conf
user=root
autostart=true
autorestart=true
stdout_logfile=/tmp/stunnellog.log
stderr_logfile=/tmp/stunnelerr.log
stopsignal=QUIT
@shelomito12
Copy link

shelomito12 commented Mar 20, 2020

Hey i tried your config to use it with stunnel on my ubuntu server, but got FATAL errors every time I try to start supervisorctl. Do you have any advice to make it work?

@wynemo
Copy link
Author

wynemo commented Mar 24, 2020

Hey i tried your config to use it with stunnel on my ubuntu server, but got FATAL errors every time I try to start supervisorctl. Do you have any advice to make it work?
i install stunnel on ubuntu 18.04 server:
you should check foreground = yes in /etc/stunnel/stunnel.conf, make stunnel run in foreground.
and try run sudo stunnel4 /etc/stunnel/stunnel.conf in terminal to see if works:

ubuntu@ubuntu-lts:~$ sudo stunnel4 /etc/stunnel/stunnel.conf
2020.03.24 11:52:26 LOG5[ui]: stunnel 5.44 on x86_64-pc-linux-gnu platform
2020.03.24 11:52:26 LOG5[ui]: Compiled with OpenSSL 1.1.0g  2 Nov 2017
2020.03.24 11:52:26 LOG5[ui]: Running  with OpenSSL 1.1.1  11 Sep 2018
2020.03.24 11:52:26 LOG5[ui]: Update OpenSSL shared libraries or rebuild stunnel
2020.03.24 11:52:26 LOG5[ui]: Threading:PTHREAD Sockets:POLL,IPv6,SYSTEMD TLS:ENGINE,FIPS,OCSP,PSK,SNI Auth:LIBWRAP
2020.03.24 11:52:26 LOG5[ui]: Reading configuration from file /etc/stunnel/stunnel.conf
2020.03.24 11:52:26 LOG5[ui]: UTF-8 byte order mark detected
2020.03.24 11:52:26 LOG5[ui]: FIPS mode disabled
2020.03.24 11:52:26 LOG5[ui]: Configuration successful

if it works, you could add stunnel to supervisorctl.

@shelomito12
Copy link

Hey thanks for your reply. I will try this tonight.
One question: did you install supervisord via apt-get or pip? Also, do you have a custom config.d/ directory with your conf file in it?

@shelomito12
Copy link

I was surprised I got this negative answer on the supervisord GitHub page: Supervisor/supervisor#1338 (comment) any thoughts?

@shelomito12
Copy link

@wynemo It works! thanks a lot. I had uninstalled supervisord but reinstalled it again using apt-get, then added parameter foreground = yes to stunnel.conf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment