You can define your special nginx settings with custom virtual host template
Changing Virtual Hosts Settings Using Configuration Templates
But note that this solution will affect all your newly created sites.
I tried this method but it failed. I am using Nginx as a full front-line server (and not as a proxy to Apache). I wanted to install Varnish in front of Nginx so I tried to change the listening port for Nginx from 80 to 8800 using templates. It simply does NOT work, no matter what I do. Nginx always takes over port 80 and blocks Varnish from starting and it simultaneously begins listening on port 8800 as well.
I edited the following files, preserving the directory structure:
nginxDomainForwardingIpDefault.php
nginxDomainForwarding.php
nginxDomainVhostIpDefault.php
nginxDomainVhost.php
nginx.php
nginxWebmail.php
I changed the following lines in all the 6 files wherever it was occurring:
'ssl' => false,
'frontendPort' => $VAR->server->nginx->httpPort,
'ssl' => true,
'frontendPort' => $VAR->server->nginx->httpsPort,
Changed to this:
'ssl' => false,
'frontendPort' => "8800",
'ssl' => true,
'frontendPort' => "8801",
Here are the commands I used:
# mkdir /usr/local/psa/admin/conf/templates/custom/
# cp /usr/local/psa/admin/conf/templates/default/nginx* /usr/local/psa/admin/conf/templates/custom/
# mkdir /usr/local/psa/admin/conf/templates/custom/webmail/
# cp /usr/local/psa/admin/conf/templates/default/webmail/nginxWebmail.php /usr/local/psa/admin/conf/templates/custom/webmail/
And of course after all the changes I restarted Nginx but it still binds to port 80 and 8800 at the same time. So I had to delete the custom templates and revert to the original setup until I get proper answers or directions.
I am on Ubuntu 18.04.3 LTS and Plesk Onyx 17.8.11 Update #81