Answer the question
In order to leave comments, you need to log in
How to properly configure gunicorn for two sites on the same ip?
There are 2 projects on django, you need to place them in one vps.
It seems that I figured out everything, but I can’t figure out what to do with gunicorn.
Deploy based on this article here: https://www.digitalocean.com/community/tutorials/h...
accordingly created gunicorn.socket file with the following content:
[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/ gunicorn.sock
[Install]
WantedBy=sockets.target
this file, as I understand it, is one and common for all gunicorn,
and here is the settings file for the gunicorn service itself:
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=sammy
Group=www-data
WorkingDirectory=/home/sammy/myprojectdir
ExecStart=/home/sammy/myprojectdir/myprojectenv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn. sock \
myproject.wsgi:application
[Install]
WantedBy=multi-user.target
how to specify two different projects here?
How to simply create 2 domainname.conf files with nginx does not work here. What to do?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question