I’ve uploaded my first django app to the web. I’m working with Ubuntu 16.04 because I have seen it has lots of documentation. I can see my web app when I type the IP Address of it on the web browser.

I purchased a domain name at GoDaddy, let’s call it ‘example.com’. I have already set the DigitalOcean DNS at my domain, following the instructions of this tutorial: [https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars](http://), and have tried to link it with the IP Address.

At the end, when I type 'example.com’ it shows me 'Internal Server Error’, unlike the IP Address which works perfectly. I tried to add the domain name at the nginx server without success. How can I link my domain name with the IP Address?

PS: I have read that most of the people link the domain name with the IP Address before configuring everything else. Should I delete my dropplet and start it over again?

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.

×
1 answer

Hi

Can you post the Nginx configs here?

Cheers

  • Hello,

    Thank you for your interest.

    The Nginx config looks like something like this.

    server {
        listen 80;
        server_name 65.40.90.xxxx;
    
        location = /favicon.ico { access_log off; log_not_found off; }
        location /static/ {
            root /home/sammy/myproject;
        }
    
        location / {
            include proxy_params;
            proxy_pass http://unix:/home/sammy/myproject/myproject.sock;
        }
    }
    
    server {
        listen 80;
        server_name example.com;
    
        location = /favicon.ico { access_log off; log_not_found off; }
        location /static/ {
            root /home/sammy/myproject;
        }
    
        location / {
            include proxy_params;
            proxy_pass http://unix:/home/sammy/myproject/myproject.sock;
        }
    }
    
Submit an Answer