Changing the default http port on nginx with Plesk 12.5 is my biggest problem I know how to set up Varnish.
I also know to do this on the server with out the Plesk.
My OS is Debian 8.3, I wind some instructions for Centos but they were unhelpful to me.
2
Answers
There is two ways
Official with trade-offs:
customizing Plesk’s web server configs templates as described here https://talk.plesk.com/threads/solved-help-required-change-nginx-port.331439/
You have to starts with creating folder
/usr/local/psa/admin/conf/templates/custom
and copying following files from/usr/local/psa/admin/conf/templates/default
:and replace
$VAR->server->nginx->httpPort
in each file with port number you want.Trade-offs are: after upgrade to next version you should perform this procedure again. All changes which will be performed by updates for
default
templates will be not applies to you.Fast with unknown side effects: just change ports in table ServiceNodeConfiguration:
mysql -uadmin -p
cat /etc/psa/.psa.shadow
-Dpsa -e “select * from ServiceNodeConfiguration where section = ‘webProxy'”And don’t forget for
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
This is a good command to change port 80 in database for nginx. Varnish now can work through port 80.