Answer the question
In order to leave comments, you need to log in
How to link a domain, nginx + uwsgi + django?
Help a newbie.
I'm trying to host a django project on a vps.
I read a lot of tutorials, including this one habrahabr.ru/post/226419
Now I have a django application running on xxxx:8000 (it works)
And on xxxx - "welcome to nginx
" .ru was loading the site without specifying the port?
Answer the question
In order to leave comments, you need to log in
Remove all hosts from nginx:
Add host to /etc/nginx/sites-available/<mydomain>
:
server {
listen 80;
server_name <mydomain>;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
/etc/init.d/nginx restart
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question