Revision history [back]
I use uwsgi
with nginx
This is my nginx configuration:
server {
listen 80;
server_name ldstw.org www.ldstw.org;
location / {
include uwsgi_params;
uwsgi_pass unix:/home/s930029/GospelForum/askbot.sock;
}
}
This is my uwsgi configuration
[uwsgi]
project = askbot
base = /home/s930029
static-map = /m=/home/s930029/GospelForum/static
chdir = %(base)
home = /home/s930029/.virtualenvs/askbot/
wsgi-file = /home/s930029/GospelForum/django.wsgi
master = true
processes = 5
threads = 2
logto = /var/log/uwsgi/%n.log
socket = %(base)/GospelForum/askbot.sock
chmod-socket = 664
setuid = www-data
setgid = www-data
vacuum = true
My /etc/systemd/system/uwsgi.service
[Unit]
Description=uWSGI Emperor service
[Service]
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown s930029:www-data /run/uwsgi'
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
For explanation: see https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04
I use uwsgi
with nginx
This is my nginx configuration:
server {
listen 80;
server_name ldstw.org www.ldstw.org;
location / {
include uwsgi_params;
uwsgi_pass unix:/home/s930029/GospelForum/askbot.sock;
}
}
This is my uwsgi configuration
[uwsgi]
project = askbot
base = /home/s930029
static-map = /m=/home/s930029/GospelForum/static
chdir = %(base)
home = /home/s930029/.virtualenvs/askbot/
wsgi-file = /home/s930029/GospelForum/django.wsgi
master = true
processes = 5
threads = 2
logto = /var/log/uwsgi/%n.log
socket = %(base)/GospelForum/askbot.sock
chmod-socket = 664
setuid = www-data
setgid = www-data
vacuum = true
My /etc/systemd/system/uwsgi.service
[Unit]
Description=uWSGI Emperor service
[Service]
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown s930029:www-data /run/uwsgi'
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
For explanation: see https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04