• 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.

Question How can I permanently remove Nginx from Port 80?

Lethalmiko

New Pleskian
The Plesk documentation and other online discussion threads say that to change the listening ports of the webserver, you use templates, but all the instructions to change the port Nginx listens on have failed to remove it from port 80. All they do is add an extra port for listening to. I use Nginx as a frontline server (not as a reverse proxy to Apache). The instructions say to make copies of 6 Nginx template files and put them into a custom directory and edit them. ie

# 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/

List of files to edit:

nginxDomainForwardingIpDefault.php
nginxDomainForwarding.php
nginxDomainVhostIpDefault.php
nginxDomainVhost.php
nginx.php
nginxWebmail.php

I looked for the line:

'ssl' => false,
'frontendPort' => $VAR->server->nginx->httpPort,

Changed to this:

'ssl' => false,
'frontendPort' => "8888",

Then:

# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
# /etc/init.d/nginx restart

But after all this, Nginx still binds to port 80. All the instructions on the threads I found online (including the Plesk forums) on this topic simply DO NOT WORK!!!

eg this thread: [Solved] help required - change nginx port

Here is what happens:

# netstat -nlpt | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 30019/nginx: master
tcp 0 0 x.x.x.x:8888 0.0.0.0:* LISTEN 30019/nginx: master
tcp 0 0 x.x.x.x:443 0.0.0.0:* LISTEN 30019/nginx: master

I use ‪Ubuntu 18.04.3 LTS‬ and Plesk Onyx 17.8.11 Update #81.

Someone please HELP!!!
 
Last edited:
It turns out that all the instructions for changing the listening port for either Apache or Nginx do not work. For example this guide in the documentation doesn't work:


I disabled Nginx from the Plesk Panel, then changed the Apache port in 14 files as per instructions. Regenerated system files, restarted Apache but it still blocks Port 80. If I stop Apache and start a caching server in front of it on port 80, Apache refuses to start. List of custom template files:

/usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php
/usr/local/psa/admin/conf/templates/custom/domain/frameForwarding.php
/usr/local/psa/admin/conf/templates/custom/server/mailman.php
/usr/local/psa/admin/conf/templates/custom/server/nameVirtualHost.php
/usr/local/psa/admin/conf/templates/custom/nginx.php
/usr/local/psa/admin/conf/templates/custom/nginxDomainForwarding.php
/usr/local/psa/admin/conf/templates/custom/nginxDomainForwardingIpDefault.php
/usr/local/psa/admin/conf/templates/custom/nginxDomainVhost.php
/usr/local/psa/admin/conf/templates/custom/nginxDomainVhostIpDefault.php
/usr/local/psa/admin/conf/templates/custom/webmail/nginxWebmail.php
/usr/local/psa/admin/conf/templates/custom/server/pleskServiceLocaldomain.php
/usr/local/psa/admin/conf/templates/custom/domain/standardForwarding.php
/usr/local/psa/admin/conf/templates/custom/server/vhosts.php
/usr/local/psa/admin/conf/templates/custom/webmail/webmail.php

I really don't understand why instructions that don't work have been put into official documentation. :(
 
Back
Top