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 {
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
Status: inactive
and 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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
I did
sudo fuser -k 80/tcp
and did service nginx restart and site is up again.A big thanks to @bobbyiliev
Thanks a lot @bobbyiliev
When I do
passenger start
I get:Also when I deploy using capistrano I have
There are no Phusion Passenger-served applications running whose paths begin with '/home/deploy/domain'.
so I didcd
to that folder and did:passenger start --port 80
and got:the command
passenger start
in the same folder give:So for port 3000 I did
sudo fuser -k 3000/tcp
and now when I dosudo netstat -plant | grep 3000
there is nothing that is running.I appreciate your help @bobbyiliev
@bobbyiliev appreciate your help
I don’t run apache, only Nginx and the output is
Any suggestions? Thanks in advance