[Django]-Amazon EC2 Deployment Not Working When IP Address Typed Into Browser Suspect Ngnix Problems

4👍

Hope you have done the following step:

sudo ln -s /etc/nginx/sites-available/flower_shop /etc/nginx/sites-enabled/flower_shop

Some other diagnostic commands which will help pin down the problem:

  1. Supply nginx error and access logs
  2. output of netstat -tulpn | grep nginx
  3. In ssh session do curl -D – http://localhost:80
  4. Try replacing the above snippet with the following extremely simple server config. Notice the only filtering it has for now is for port 80. It assumes your gunicorn is serving at 8080. Change port appropriately, if required.

“`

server{
    listen 80;
    location / {
        proxy_pass http://localhost:8080;
    } 
}

“`

Leave a comment