Nginx pointing to django project via domain name, but pointing to default nginx page via IP

I have the following in /etc/nginx/sites-available/jobzumo:

        listen 80;
        server_name '';
        location = /favicon.ico { access_log off; log_not_found $
        location /static/ {
        root /home/justin/project;
        location / {
                include proxy_params;
                proxy_pass http://unix:/run/gunicorn.sock;

If I visit, I will see the default django rocket ship and everything is working fine. If I visit my IP I will see the default ‘welcome to nginx’ page. If I change the server_name to my IP instead of the ‘’ domain name, the opposite will happen(Rocket ship at IP, welcome to nginx at domain). Does anyone know how to get both the IP and domain name to point at my django project?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


I can see that your website is already loading the Django installation. Would you mind sharing with the community how you solved the problem?

I believe that a possible issue that could be causing the problem is the server_name part in your configuration file, I would recommend not using quotes there.

Regards, Bobby