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!!!
# 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: