• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

When nginx is stopped, sites don't work on Apache restart

BurrellS

New Pleskian
I'm running Plesk v11.0.9 with the latest updates, on CentOS.

Recently I went into Services Management and disabled nginx, in order to fix some issues with accessing webmail securely, etc.

This worked properly for my needs -- nginx stopped after several seconds, and the webmail and other specific sites I was having issues with started working normally as desired. I left nginx stopped, and continued working with my websites. Everything seemed to be working fine.

However, if I make any changes to the websites in Plesk or add any new sites, then after Plesk makes the changes take effect, the websites no longer work. Instead, the default Plesk page shows whenever you try to reach the websites.

Going back into Services Management and starting nginx makes everything work again.

Can anyone provide some advice on how to safely disable or remove nginx from this Plesk installation? It seems like Plesk is expecting nginx to be running after it makes configuration changes and then restarts Apache, and instead stops working properly if nginx is not running.

Any advice would be helpful. I may want to use nginx in the future, so if there was a way to fix this particular issue, that would be great.
 
Instead of stopping nginx service you should disable it with corresponding utility:

# /usr/local/psa/admin/bin/nginxmng --help

Usage: nginxmng command [options]
Available commands:
--enable or -e Enable nginx proxy
--disable or -d Disable nginx proxy
--status or -s Show status of nginx proxy
--help or -h Displays this help page.
 
However, if I make any changes to the websites in Plesk or add any new sites, then after Plesk makes the changes take effect, the websites no longer work. Instead, the default Plesk page shows whenever you try to reach the websites.

At that point also /usr/local/psa/admin/sbin/httpdmng --reconfigure-all should have solved it usually once and for all ...
 
Instead of stopping nginx service you should disable it with corresponding utility:

Quote:
# /usr/local/psa/admin/bin/nginxmng --help

Usage: nginxmng command [options]
Available commands:
--enable or -e Enable nginx proxy
--disable or -d Disable nginx proxy
--status or -s Show status of nginx proxy
--help or -h Displays this help page.

Hi Igor -- So, should I disable nginx using the command you provided, and then subsequently reconfigure the sites using the command Abdi provided (after nginx is disabled) ?
 
In the process of disabling Nginx the vhosts are rebuilt so you don't have to re-run again /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
 
Back
Top