From 932666ceed979c01d58f7d300d46bccd4db0572c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 2 Jul 2021 02:55:20 -0400 Subject: tweaks, standalone, openalias link imgs --- standalone.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 standalone.html (limited to 'standalone.html') diff --git a/standalone.html b/standalone.html new file mode 100644 index 0000000..5d7f04a --- /dev/null +++ b/standalone.html @@ -0,0 +1,32 @@ + + + + Certbot on Standalone Domains and Subdomains – LandChad.net + + + + + + + +

Certbot on Standalone Domains and Subdomains

+ +
+

The command certbot --nginx will take an unencrypted website on an Nginx configuration file, get a certificate for it and change the configuration to use that certificate and thus HTTPS.

+ +

Sometimes, however, you are given an Nginx configuration template that already has encryption/HTTPS, so running the automated certbot --nginx is not possible, as it will simply give an error saying that the certicate that Nginx is looking for doesn't already exist and thus the Nginx config is broken.

+ +

So suppose you want to get a certificate for pleroma.example.org because you are installing Pleroma and the configuration file presupposes a certificate. + In this case you would want to run this:

+ +
systemctl stop nginx
+certbot certonly --standalone -d pleroma.example.org
+systemctl start nginx
+ +

What we do here is temporarily turn of Nginx, then run a certonly subcommand that generates a certificate for the domain without changing or caring about the Nginx configuration. Then we reactivate Nginx, thus turning back on our webserver.

+

The reason we deactivate Nginx is that it uses the ports that Certbot will want to bind to, and thus we must temporarily turn Nginx off to let Certbot use those ports. (What it actually does is spin up a dummy webserver that doesn't need to think about the Nginx configuration.)

+

This is just a little note of something that might confuse people, but the three commands above should suffice. If your site is still managed by Nginx, it should still be able to renew with simple certbot renew --nginx without a problem.

+
+ + + -- cgit v1.2.3