Report this

What is the reason for this report?

Using Ubuntu 20.04, Nginx, Gunicorn, and Django. Can't get domain to work.

Posted on November 20, 2020

I followed the tutorial here and seemed to have everything working: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04

The IP works fine, no errors with nginx, no errors with gunicorn, but my domain just won’t work.

Sites available:

server {
    listen 80;
    server_name tabletopadmiral.com www.tabletopadmiral.com 167.99.5.101;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/andrewi/tta;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
    }
}

gunicorn.service:

[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target

[Service]
User=andrewi
Group=www-data
WorkingDirectory=/home/andrewi/tta
ExecStart=/home/andrewi/tta/tta/bin/gunicorn \
          --access-logfile - \
          --workers 3 \
          --bind unix:/run/gunicorn.sock \
          tta.wsgi:application

[Install]
WantedBy=multi-user.target

gunicorn.socket:

[Unit]
Description=gunicorn socket

[Socket]
ListenStream=/run/gunicorn.sock

[Install]
WantedBy=sockets.target

Any help would be appreciated.



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!

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.

Hi Bro, I checked your website is working fine.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.