Answer the question
In order to leave comments, you need to log in
Why doesn't the site show up when I use sockets instead of ports in uwsgi?
There is a site mysite.ru. In nginx config:
upstream django{
server unix:///home/projects/mysite/mysite.sock;
}
server{
listen 80;
server_name mysite.ru;
charset utf-8;
client_max_body_size 75M;
location /media/{
alias /home/projects/mysite/media;
}
location /static/{
alias /home/projects/mysite/static;
}
location /{
uwsgi_pass django;
include /home/projects/mysite/uwsgi_params;
}
}
I execute the nginx restart command, everything works.
Next I run uwsgi:
1. uwsgi --http :8000 --module mysite.wsgi
When I navigate to mysite.ru:8000, I see the django
2 start page. uwsgi --socket mysite.sock --module mysite.wsgi --chmod-socket=
666 writes that the data is not available, that is, it does not work.
If anyone knows what needs to be done to "tie up" nginx django uwsgi, and so that when you go to mysite.ru, the site itself is displayed, and not Welcome to nginx, please write what needs to be done, thanks in advance .
Answer the question
In order to leave comments, you need to log in
Judging by the nginx configuration, it listens to the standard port 80, but for some reason you go to mysite.ru:8000.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question