• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

[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:
http://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