• 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

Installing custom nginx with plesk

cjhmdm

New Pleskian
Hello,

I am trying to set up a custom nginx install (well, actually, nginx-extras from dotdeb repo) in place of sw-nginx because I need the extras features of said package. The problem I'm having is once I remove the sw-nginx package and install nginx-extras from dotdeb, the 'Reverse Proxy' setting in Services Management is no longer accessible and says the "Service is not installed".

Now, I've copied and replaced the /etc/nginx folder from the dotdeb package with the original one from the base Plesk installation, restarted all services via ssh; all to no avail.
The command 'which nginx' shows me '/usr/sbin/nginx', which is the same as the Plesk installed sw-nginx package.

Not sure what else I need to do in order to make nginx available again as a reverse proxy, anyone able to shed some light?

Thanks
 
Plesk works only with nginx packaged by Parallels. One of obvious reasons is that it requires particular package layout to operate. Therefore you will not be able to use third-party nginx packages with Plesk.

However, you can (technically) substitute nginx binary with you own custom built one, provided you used same base configure options to build it (see nginx -V, if memory serves me right).
 
I'm actually having some success so far with purging sw-nginx, installing the nginx-extras package I need, then invoking the command '/usr/local/psa/admin/bin/nginxmng --enable'
I was initially getting 403 forbidden errors but after replacing /etc/nginx installed by the nxing-extras package with the default /etc/nginx installed by sw-nginx; and then chmod 755 the vhosts directories and so far things seem ok.
I also had to uncomment the 'user nginx' line from /etc/nginx/nginx.conf.

Still testing though and will report back later. I also need to see if this setup survives reboot (which is when the option in Service Management became unavailable last time).

Worst case scenario, I guess I could compile nginx if I have to... I'd rather not because the whole point of me moving to a control panel software like Plesk was so I could stop needing to do everything manually heh.



And... doesn't survive reboot so I guess it's time to compile...
 
Last edited:
You have been warned. In the best case scenario you'll just have to battle with periodic breakages or invent an automatic "override" system. In the worst you'll wreck your installation.

To knock over the first domino, call # plesk sbin packagemng -sdf (assuming you're on Plesk 11.5).
 
I'll just compile with the same flags as the sw-nginx package and the other modules I need; as opposed to starting a fresh machine off with bandaid fixes and such.

Thanks for the info
 
Last edited:
I'll just compile with the same flags as the sw-nginx package and the other modules I need; as opposed to starting a fresh machine off with bandaid fixes and such.

Thanks for the info

Hey have you had success with this so far? I'd like to enable geoip and mod_sec for our environment, just seeing what options we get...
 
Back
Top