I have a VPS and few domains pointing to it. I'd like to use one domain as a url for my Django app. I run on nginx.
I have followed official tutorial on uWSGI successfully. Everything works while I use bind the uWSGI to an other port than 80. The server then show 500 Internal Server Error.
Additionally my /var/log/nginx/error.log says only:
2019/07/11 13:40:18 [warn] 24845#24845: conflicting server name "www.ideabooks.cz" on 0.0.0.0:80, ignored
My nginx app.conf is like this:
upstream django {
server unix:///home/radim/app.sock;
}
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name ideabooks.cz www.ideabooks.cz; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
access_log /var/www/ideabooks.cz/web/app/nginx-django_app_1-access.log;
# Django media
location /media {
alias /var/www/ideabooks.cz/web/app/media; # your Django project's media files - amend as required
}
location /static {
alias /var/www/ideabooks.cz/web/app/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /var/www/ideabooks.cz/web/app/uwsgi_params; # the uwsgi_params file you installed
}
}
The server already runs one ruby app and simple html site so I thought, there could a conflict on port 80 but then, none of the others are binded to this unique domain name.
Could someone please help me with this? Cant find any suitable solution to this... Thank you very much.