Skip to content

Instantly share code, notes, and snippets.

@hiendnguyen
Last active November 3, 2019 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiendnguyen/8722baa5dd2b223e93dbf211422fd9d1 to your computer and use it in GitHub Desktop.
Save hiendnguyen/8722baa5dd2b223e93dbf211422fd9d1 to your computer and use it in GitHub Desktop.
Configure uWSGI server and let's make it runs as a service
vi /etc/systemd/system/uwsgi.service
# Put below as its content
[Unit]
Description=uWSGI Emperor service
[Service]
ExecStartPre=/usr/bin/bash -c 'mkdir -p /run/uwsgi; chown uwsgi:nginx /run/uwsgi'
ExecStart=/var/www/p3venv/bin/uwsgi --emperor /etc/uwsgi/vassals
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment