Hello,
I am trying to make my web infonova.cz running on HTTPS. I guess I did it but it ends with this error message below. It's all little bit messed up because systemctl status nginx
command returns:
systemctl status nginx
× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-05-09 14:38:49 UTC; 12min ago
Docs: man:nginx(8)
CPU: 12ms
May 09 14:38:47 vps1789 nginx[12459]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
May 09 14:38:48 vps1789 nginx[12459]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
May 09 14:38:48 vps1789 nginx[12459]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
May 09 14:38:48 vps1789 nginx[12459]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
May 09 14:38:48 vps1789 nginx[12459]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
May 09 14:38:49 vps1789 nginx[12459]: nginx: [emerg] still could not bind()
May 09 14:38:49 vps1789 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
May 09 14:38:49 vps1789 systemd[1]: nginx.service: Failed with result 'exit-code'.
May 09 14:38:49 vps1789 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 09 14:39:22 vps1789 systemd[1]: nginx.service: Unit cannot be reloaded because it is inactive.
My domain is: infonova.cz
I ran this command: sudo certbot --nginx -d infonova.cz www.infonova.cz
It produced this output: You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/www.infonova.cz.conf)
What would you like to do?
1: Attempt to reinstall this existing certificate
2: Renew & replace the certificate (may be subject to CA rate limits)
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
Deploying certificate
Successfully deployed certificate for infonova.cz to /etc/nginx/sites-enabled/infonova.conf
Successfully deployed certificate for www.infonova.cz to /etc/nginx/sites-enabled/infonova.conf
An error occurred and we failed to restore your config and restart your server. Please post to Help - Let's Encrypt Community Support with details about your configuration and this error you received.
Encountered exception during recovery: certbot.errors.MisconfigurationError: nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] still could not bind()
NEXT STEPS:
- The certificate was saved, but could not be installed (installer: nginx). After fixing the error shown below, try installing it again by running:
certbot install --cert-name www.infonova.cz
My web server is (include version): nginx/1.14.2
The operating system my web server runs on is (include version): Ubuntu 22.04.2 LTS jammy
My hosting provider, if applicable, is: czechia.com
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.21.0