• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

$VAR->server->nginx->httpPort

Richard Owen

New Pleskian
This may be a silly question but where does Plesk pull this value from?

I am trying to install Varnish Cache with NGINX running as a reverse proxy for Apache in Plesk 12
 
Hi Igor,

this tells me that i need to change $VAR->server->nginx->httpPort to a value. I was looking at changing where is pulled that from in the first place.

It boils down to me trying to install varnish cache.

I currently have nginx listening on 80 : 443 apache on 7080 and 7081.

My intention if correct is to sit varnish in front of both of these so its on port 80 and then move nginx to 8080 and tell varnish to forward requests to this.

Does that sound right?
 
Hi Richard Owen,

please consider first to read more about varnish, together with nginx usage. nginx handles static files pretty well alone, it IS already a proxy for apache2 and can directly "talk" to PHP and memcache. I tested two identical servers and configurations over one month. There was no speed advantage at all for varnish+nginx to nginx.

If you only host one or two domains on your server, you could think of "playing" around with varnish, but if you are on a production server, with more than ten domains and different contents, please keep in mind, that it will take far more time to investigate and solve issues, when you have varnish installed as well, so your "toy" will only waste your time with no profit at all.
 
BTW, you can use fast method but with unknown side effects: just change ports in table ServiceNodeConfiguration:

mysql -uadmin -pcat /etc/psa/.psa.shadow -Dpsa -e "select * from ServiceNodeConfiguration where section = 'webProxy'"

+---------------+----------+-----------------+-------+
| serviceNodeId | section | name | value |
+---------------+----------+-----------------+-------+
| 1 | webProxy | enabled | true |
| 1 | webProxy | frontendPort | 80 |
| 1 | webProxy | sslFrontendPort | 443 |
+---------------+----------+-----------------+-------+

and don't forget for /usr/local/psa/admin/bin/httpdmng --reconfigure-all
 
Back
Top