the browser shows "This site can't be reached"

September 8, 2018 1.3k views
Django Nginx PostgreSQL Python Ubuntu 18.04

I have a problem, my problem is that the browser shows “This site can’t be reached” or “The connection was reset.” I use or have followed the tutorial “How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 18.04” from beginning to end, and yeay it works but it only takes a few moments until I reload my website and the problem occurs Then I followed the “Troubleshooting Nginx and Gunicorn” method to find my problem but with insufficient experience and really just plunging the world like this I was confused about what was wrong and this problem happened. there was one thing that made me hesitate to give a little details on the core of my problem, when I looked at the application gunicorn and gunicorn. socket there was a little showing something was wrong and something was stopped. I ask for all of you who really understand so that I can help me to solve this problem and give as many steps as possible or maybe you can find other causes. thank you: D

https://photos.app.goo.gl/Wmw1u1Fp5rrq2DVt7

2 Answers

Were you able to solve it @RizkiR? I’m having similar issue right now.

I solve the problem by changing a line in /etc/nginx/nginx.conf file as follows:

Virtual Host Configs

include /etc/nginx/sites-enabled/.; // files

It should be:

include /etc/nginx/sites-enabled/*; //directories


I traced this error to Let’s Encrypt on Ubuntu 18.04. Let’s Encrypt on Ubuntu 16 updates the line correctly, but 18.04 did not. The addition (.*) causes all sort of connection issues.

I hope it helps, although it is belated.

Have another answer? Share your knowledge.