NixOS ACME / LetsEncrypt | 103 Members | |
| Another day, another cert renewal | 42 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Oct 2023 | ||
Download tenor_gif9132551967232721932.gif | 13:59:42 | |
| osnyx (he/him): I'm just seeing your message now. I personally use Apache and definitely have added new domains to running hosts. What I imagine has gone wrong here is that the Acme module assumes some mechanism will reload nginx when its own config changes irrespective of nginx-config-reload (aka switch-to-configuration will do it). That way the self signed certs get used initially then once renewal succeeds nginx-config-reload will reload it a second time, and http-01 validation succeeds. Really we just need to look at the order of operations during a rebuild and work from there. I would expect there to be a reload of nginx during the switch, after self signed, and before the renewal service | 14:09:50 | |
| Confusing English gonna edit that 😅 | 14:10:47 | |
| * osnyx (he/him): I'm just seeing your message now. I personally use Apache and definitely have added new domains to running hosts. What I imagine has gone wrong here is that the Acme module assumes some mechanism will reload nginx when its own config changes irrespective of nginx-config-reload (aka switch-to-configuration will do it). That way the self signed certs get used initially, http-01 validation happens, then once renewal succeeds nginx-config-reload will reload it a second time. Really we just need to look at the order of operations during a rebuild and work from there. I would expect there to be a reload of nginx during the switch, after self signed, and before the renewal service | 14:11:17 | |
But that cannot happen because the yet-to-be-generated certificate files are already referenced by the new config after switch, irrespectively whether the self-signed services have already run. | 14:12:14 | |
| I read (haven't tried myself) that nginx crashes when the config references nonexisting cert files. This is probably one of the main reasons for the existence of nginx-config-reload, as it has a condition gurad that checks for the existence of cert files. | 14:13:27 | |
| Yes indeed. I think Apache silently fails here, and by the time a request is made selfsinged has run. I don't remember how nginx does it. Actually - bigger point. The test suite is passing 😛 how? I'm pretty sure I have a test for your exact scenario | 14:14:04 | |
| I've done a workaround for our own fork of the nginx module now. As we plan to move towards upstream anyways, I'll probably want to get this fixed there as well and will soon-ish try to write a reproducer in the acme tests. Shouldn't be that hard. | 14:15:18 | |
In reply to @m1cr0man:m1cr0man.comBut yeah, I should have a look at ALL the tests. | 14:15:59 | |