If I use; gunicorn –bind 0.0.0.0:8000 my_project.wsgi works
Then this is my config:
gunicorn.socket
[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
[Install]
WantedBy=sockets.target
gunicorn service
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=my_user
Group=www-data
WorkingDirectory=/home/my_user/test
EnvironmentFile=/home/my_user/test/.env
ExecStart=/home/my_user/test/env/bin/gunicorn
–access-logfile –
–workers 3
–bind unix:/run/gunicorn.sock
my_project.wsgi:application
[Install]
WantedBy=multi-user.target
/etc/nginx/sites-available/test
server {
listen 80;
server_name IP;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/my_user/test;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Every systemctl status is running but I still show Welcome to Nginx! I want to show my Django App. What can i do?
Rubén is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.