Nginx SSL config changing after update

Status
Not open for further replies.

IngiThor

Silver Partner
Basic Certified
Joined
Jul 1, 2021
Messages
4
Reaction score
0
Hello everyone,

We're running multiple own-hosted/on-prem 3CX servers.
Recently I changed all of them to use letsencrypt certificates and set it up as per the instructions in this thread which worked excellently.

Over the weekend 3CX auto update kicked in and upgraded all of them to the 18.0 Update 7.
This seems to have reset the Nginx 3cxpbx config to point the SSL_certificate and key to our previous expired non- letsencrypt/certbot certificate.



I'd really like to avoid having to manually reapply the SSL config on each update.
Is there any way of configuring the 3CX updates to not change the Nginx config or otherwise avoid changing the SSL lines?
 
Any 3CX Update could brake your custom configs.
 
If the cert and key paths are the only parameters you’re changing in the nginx config I would recommend setting up either a cron job or a custom systemd service to execute a script to solve your particular problem. The script compares the cert and key stored in the directory that the default nginx config expects with the cert and key in the letsencrypt directory. If they don’t match the script copies the letsencrypt files to the default expected directory and sets the appropriate ownership, permissions, and file names. Configure the cron job to run at whatever interval you find appropriate. Alternatively, create a custom systemd service that hooks onto the “start/restart” action of the nginx service that then executes the script.

See my post here for some insight into the custom systemd service option, if you’re unfamiliar with what that would entail:

https://www.3cx.com/community/threads/implementing-qos-on-debian-based-pabx.115643/post-535992

Do keep in mind that none of this would be supported by 3CX.

That's a clever workaround.
Gonna look into implementing it, thanks.
 
Status
Not open for further replies.

Forum statistics

Threads
111,872
Messages
589,492
Members
164,718
Latest member
appservices@bergmanbrothe