Error trying to restart NGINX in Terminal Service for installing SSL Let’s Encrypt

Asked

Viewed 131 times

1

I’m trying to accomplish this step by step

how-to-Secure-Nginx-with-Let-s-Encrypt-on-Ubuntu-16-04

For the purpose of installing a free ssl certificate Let’s Encrypt

My problem:

I can’t reset the NGINX or start the service manually. to proceed with the step by step installation.

Step 2 - Setting up Nginx

Trying to restart.

sudo systemctl reload nginx
nginx.service is not active, cannot reload.

Trying to start manually.

sudo service nginx start
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

Checking Status of configuration.

 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
 nginx: configuration file /etc/nginx/nginx.conf test is successful

Checking log.

  sudo nano /var/log/nginx/error.log

Log.

2019/07/11 12:27:16 [notice] 3617#3617: signal process started
2019/07/11 12:27:16 [error] 3617#3617: open() "/run/nginx.pid" failed (2: No such file or directory)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:35:42 [emerg] 3816#3816: still could not bind()
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to 0.0.0.0:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: bind() to [::]:80 failed (98: Address already in use)
2019/07/11 12:37:28 [emerg] 4085#4085: still could not bind()

Checking configuration

sudo nano /etc/nginx/sites-available/default

Configuration status.

# Default server configuration
#
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html;

        index index.html index.htm index.nginx-debian.html;

        server_name www.sistemasjca.com.br;

        location / {
                try_files $uri $uri/ =404;
        }
  • I have that doubt too. I always get stuck in this part.

  • This step by step here is simpler and is of the certbot itself. In step 4 you can do so for example sudo certbot --nginx -d meudominio.com -d www.meudominio.com -d abc.meudominio.com

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.