cPanel now officially supports Nginx as a web server (completely replaces Apache). You can read more about their implementation in their official documentation here.
We’ve been playing around with it, and while everything seemed to be working out of the box, we noted that when restoring an account from backup (using JetBackup), nginx configuration need to be reloaded again, otherwise the account will return “404 error“.
The solution is very simple, reloading the nginx configuration could be done via the following cli script
/usr/local/cpanel/scripts/ea-nginx config --all
We can automate the procedure through JetBackup Hooks – we need to create a post restore hook, that will be initiated after a full account restore.
We tested a full account restore using the hook, and site is working good –
Nothing like a good automation 🙂
Tags: cPanel, JetBackup, nginx
Leave a Reply