Answer the question
In order to leave comments, you need to log in
How to put second django+gunicorn+nginx site under ubuntu server?
One site got up, I'm trying to make a second one on a different port.
Created venv and activated
source crm3_env/bin/activate
Installed django and second time gunicorn
sudo pip install Django
sudo pip install gunicorn
Created gunicorn.service file for the second project
sudo nano /etc/systemd/system/gcorn_crm3.service
[Unit]
Description=crm3 daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=root
WorkingDirectory=/var/www/crm3/CRM3/ #path to directory with manage.py file
ExecStart=/var/www/ crm3/crm3_env/bin/gunicorn --workers 5 --bind unix:/run/gcorn_crm3.sock CRM3.wsgi:application
[Install]
WantedBy=multi-user.target
(crm3_env) [email protected]:/var/www/crm3/crm3_env/bin$ systemd-analyze verify gcorn_crm3.service
Failed to bind to varlink socket: Address already in use
Failed to set up Varlink server, ignoring: Address already in use
snap -lxd-22753.mount: Unit is bound to inactive unit dev-loop2.device. Stopping, too.
snap-lxd-21029.mount: Unit is bound to inactive unit dev-loop4.device. Stopping, too.
snap-core20-1405.mount: Unit is bound to inactive unit dev-loop3.device. Stopping, too.
gcorn_crm3.service: Command /var/www/crm3/crm3_env/bin/gunicorn is not executable: No such file or directory
(crm3_env) [email protected]:/var/www/crm3/crm3_env/bin$ cd /var/www/crm3/crm3_env/bin/
(crm3_env) [email protected]:/var/www/crm3/crm3_env/bin$ ls
activate activate.csh activate.fish Activate.ps1 easy_install easy_install-3.8 pip pip3 pip3.8 python python3
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