Re:Setting up a static HTTPS website on your Raspberry Pi us...
by inportb on Sunday October 24, 2021 @01:48PM
(#28980251)
Just be aware that nginx needs a self-signed certificate in the very beginning, to serve the .well-known/acme-challenge directory. To simplify the initial setup, I include a default "snake oil" certificate, which gets overwritten.
[ Parent
| on HN ]
Re:Setting up a static HTTPS website on your Raspberry Pi us...
by megous on Sunday October 24, 2021 @01:54PM
(#28980310)
It doesn't. You can serve it over http.
Re:Setting up a static HTTPS website on your Raspberry Pi us...
by yjftsjthsd-h on Sunday October 24, 2021 @05:03PM
(#28981895)
With apache2 httpd, you can of course serve the challenge over insecure HTTP, but httpd won't start if you say it should use a cert that doesn't actually exist, so for the sake of automated setup and not having to edit the config multiple times it's way easier to write a self-signed cert and then overwrite it with LE. I think the situation is the same with nginx but not 100% sure.
Re:Setting up a static HTTPS website on your Raspberry Pi us...
by megous on Sunday October 24, 2021 @08:27PM
(#28983276)
You can use IfFile to gate the TLS part of the server until the certificate file exists, if you really don't want to edit your config files during TLS bootstrap.
Re:Setting up a static HTTPS website on your Raspberry Pi us...
by inportb on Sunday October 24, 2021 @09:24PM
(#28983581)
The situation is the same with nginx. It's way easier to write a self-signed cert and then overwrite it with LE.
Re:Setting up a static HTTPS website on your Raspberry Pi us...
by ossusermivami on Sunday October 24, 2021 @05:27PM
(#28982096)
I just use dns and acme.sh for that reason and not bother about it anymore
Re:Setting up a static HTTPS website on your Raspberry Pi us...
by inportb on Sunday October 24, 2021 @01:58PM
(#28980351)
Interesting! Thanks for pointing that out.
Though... I think I'd still include the snake oil cert and serve everything over SSL, because it simplifies the configuration.