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

Posted September 8, 2018 4.6k views
NginxPythonPostgreSQLDjangoUbuntu 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

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.

Submit an Answer
2 answers

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.

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