• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

[Solved] help required - change nginx port

Imad S

New Pleskian
Hey,

I need help in changing the nginx port. I've followed various threads and have created a custom nginxDomainVirtualHost.php file at: /usr/local/psa/admin/conf/templates/custom/domain, while the website indeed moves to the port I have set, a second nginx thread starts at port 80 and takes over in it's place.

I need to put varnish at port 80 and cannot do so until all services relinquish control on port 80.

Help please.

Solved!

Followed clues here:
http://download1.parallels.com/Ples...nistration-guide/index.htm?fileName=68800.htm

some here:
https://talk.plesk.com/threads/step...and-integrate-varnish-with-plesk-12-x.310544/

Turn's out to be able to change the nginx port to a non-standard port you need to edit 6 files
  • nginx.php
  • nginxDomainForwarding.php
  • nginxDomainForwardingIpDefault.php
  • nginxDomainVhost.php
  • nginxDomainVhostIpDefault.php
  • nginxWebmail.php

For the time being i disabled SSL support for my test domain as I didn't need it. The line you need to look for the in above files is:
Code:
$VAR->server->nginx->httpPort

So the line would finally become from this:
Code:
<?php echo $VAR->includeTemplate('server/nginxVhosts.php', array(
    'ssl' => false,
    'frontendPort' => $VAR->server->nginx->httpPort,
    'backendPort' => $VAR->server->webserver->httpPort,
)) ?>

to this:
Code:
<?php echo $VAR->includeTemplate('server/nginxVhosts.php', array(
    'ssl' => false,
    'frontendPort' => "8888",
    'backendPort' => $VAR->server->webserver->httpPort,
)) ?>

To get this to work you'll need to create a custom directory at: /usr/local/psa/admin/conf/templates
and copy the files over from the root of /usr/local/psa/admin/conf/templates/default


Hope this helps someone.
 
Last edited:
Back
Top