The following are the possible root-causes for unauthorized invalid response error:
1. Port for HTTP 80 and SSL 443 is not open
Use the port scanner (eg, https://www.whatismyip.com/port-scanner/) to scan for the both port. If the port 443 is blocked,
a) There could be a firewall in the domain hosting provider that is blocking port 443 for acme challenges.
b) Nginx configuration /etc/nginx/site-enabled does not include the SSL port 443.
2. Try uninstall the nginx and reinstall it and run the following certbot command.
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d <domain> --noninteractive --agree-tos --email myemail@excelroot.com --redirect
Good luck!
Comments