So I was setting up my certificate for a project, which I’m moving over to Vultr from AWS. However this time I was writing a bash script while I was installing all the software necessary, to automate this process in the future and practice bash scripting. I am not sure if this has anything to with the issue I am having, however I felt it was worth mentioning. I was trying automate the prompt message responses. Still trying to figure out how to automate all the responses, this is what ended up entering before I answered the prompts manual:
yes A | sudo certbot --nginx -d band-manager.ca -m wesley.coderre@gmail.com
certbot didn’t like, so I abandoned the automation to answer multiple prompts for now. Now I’m getting this message when I try to set up my certificate.
**IMPORTANT NOTES:**
- Unable to install the certificate
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/band-manager.ca/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/band-manager.ca/privkey.pem
Your cert will expire on 2020-01-31. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
Also certbot is not writting any configuration in my /etc/nginx/sites-available/default file.
So I copy the config from my Amazon Ec2 instance which had the same domain name. And I still cannot see my nginx server when I go to the domain after setting up my google domains dns with the new public IP.
here’s my nginx config:
server {
server_name band-manager.ca www.band-manager.ca;
location / {
proxy_pass http://localhost:5050;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/band-manager.ca/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/band-manager.ca/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = band-manager.ca) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name band-manager.ca www.band-manager.ca;
return 404; # managed by Certbot
}
What’s happening here? Is the certbot certificate the reason I cannot see my nginx server?
My domain is:
band-manager.ca
I ran this command:
It produced this output:
My web server is (include version):
Nginx
The operating system my web server runs on is (include version):
ubuntu 18.04
My hosting provider, if applicable, is:
Vultr
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):
no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you’re using Certbot):
certbot 0.31.0