/ / Skonfiguruj wiele instancji django gunicorn za pomocą nginx - python, django, nginx, gunicorn

Skonfiguruj wiele instancji django gunicorn za pomocą nginx - python, django, nginx, gunicorn

Otrzymałem jedną witrynę django działającą z gunicorn & nginx, aby skonfigurować inną stronę również z tą samą. Ustawienia Nginx są proste, jak przerobić poniżej, aby dodać kolejną stronę /home/ubuntu/webapps/uganda_buzz/

odpowiednie ustawienia to /etc/init/gunicorn.conf

description "Gunicorn application server handling all projects"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
setuid user
setgid www-data
chdir /home/ubuntu/webapps/kenyabuzz

exec /home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application

i /etc/systemd/system/gunicorn.service

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=ubuntu
Group=nginx
WorkingDirectory=/home/ubuntu/webapps/kenyabuzz
ExecStart=/home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application

[Install]
WantedBy=multi-user.target

Odpowiedzi:

0 dla odpowiedzi № 1

Próbować Jak skonfigurować bloki serwerów Nginx (Virtual Hosts) na Ubuntu 14.04 LTS

lub Konfigurowanie wielu domen i subdomen. Problemy z DNS i Nginx obfitują!