Symptoms:
After installing the cPanel-provided NGINX (Nginx with Reverse Proxy) following the steps described in this article, the service fails to automatically start, and attempting to start the service also fails with the following error message:
systemctl start nginx; tail -f /var/log/messages
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
Feb 18 15:52:23 server systemd: nginx.service: control process exited, code=exited status=1
Feb 18 15:52:23 server systemd: Failed to start nginx - high performance web server.
Feb 18 15:52:23 server systemd: Unit nginx.service entered failed state.
Feb 18 15:52:23 server systemd: nginx.service failed.
Feb 18 15:52:35 server systemd: Starting nginx - high performance web server...
Feb 18 15:52:35 server nginx: nginx: [emerg] "proxy_cache" zone "engintron_dynamic" is unknown in /etc/nginx/nginx.conf:33
Feb 18 15:52:35 server systemd: nginx.service: control process exited, code=exited status=1
Feb 18 15:52:35 server systemd: Failed to start nginx - high performance web server.
Feb 18 15:52:35 server systemd: Unit nginx.service entered failed state.
Feb 18 15:52:35 server systemd: nginx.service failed.
Description:
This means that engintron has been previously installed and has not been properly removed from the server.
Workaround:
You need to completely remove engintron from the server. First, with the following command you should be able to find the installation script:
find / -maxdepth 6 -name "*engintron.sh*"
Then you can run this command to remove engintron from your server:
path-to-script/engintron.sh remove
After that, you should be able to reinstall the ea-nginx package using the steps described in the below article, and this time the service should start automatically.