Failing to obtain certs for nginx

My domain is: mastodon.monotropa-satellite.social

I ran this command: certbot --nginx -d mastodon.monotropa-satellite.social -d www.mastodon.monotropa-satellite.social

It produced this output: ginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/mastodon:25

My web server is (include version): nginx/1.18.0 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 20.04

My hosting provider, if applicable, is: digital ocean

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): 1.31.0

This was fixed by stopping nginx, uncommenting the ssl_certificate lines, then:

certbot certonly --standalone -d mastodon.monotropa-satellite.social -d www.mastodon.monotropa-satellite.social

Then starting nginx again.

I don't know if the www hostname is required...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.