Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
SSL Requires Restart - No Cron #556
Hi there, would really appreciate your help on this one as it causes us a huge amount of support enquiries.
We use LetsEncrypt as a plugin for cPanel, as well as AutoSSL. When a certificate is installed, the site doesn't go secure until we have restarted using the 'Restart Apache & Nginx' option within Engintron.
Under the 'cron' section of Engintron, I can see this...
However, im not too sure this is even running. Is there any way we would be able to tell?
I can see within the https_vhosts.sh file, it runds service nginx reload following the regeneration.
Is service nginx reload enough to get the SSL working? We have tried this in the past, but the site still shows as insecure until we restart both Apache and Nginx.
We obviously don't want to alter the code to restart nginx and apache entirely through a cron, incase of syntax errors etc.
Could you just clarify where we are going wrong please?
Ok, so I can verify from the logs the script appears to be running through the cron...
Jun 8 15:07:01 cloud07 CROND: (root) CMD (/etc/nginx/utilities/https_vhosts.sh >> /dev/null 2>&1)
If that is the case, why are the sites not secure until we restart Apache and Nginx entirely?
Open /etc/crontab via the Engintron WHM app and just hit save. It's important to do this through the Engintron WHM app as a previous version of the code editor used would break line endings in that file and cause custom cron jobs to break, thus refreshing the Nginx config for HTTPS would not work.
This is finally how I fixed this.
Mine runs at
So I added this to run hour later.
This works beautifully.