I tried to install Let’s Encrypt on my Ubuntu 20.04 by following this article: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04#step-4-%E2%80%94-obtaining-an-ssl-certificate and after installing Nginx stopped working and I can’t start Nginx anymore.
These are a few of the tests:
#sudo vim /etc/nginx/sites-enabled/mydomain
server_name domain.com www.domain.com;
#sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
#sudo systemctl start nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
#sudo ufw status
certbot asked me: Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. I selected to redirect. And when I visit my site without
https I get
502 Bad Gateway and when I go with
https I get
domain.com refused to connect.
Any help is appreciated and thanks in advance
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.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.