Plesk

How a combination of Apache and nginx in proxy mode works in Plesk for Linux

Question

How a combination of Apache and nginx in proxy mode works in Plesk for Linux?

Answer

When website URL is opened in browser what happens is as follows:
apache_and_nginx__2_.png

  1. Client request comes to front end Nginx asking for some resource (.html page, .php page, image, javascript, etc). Nginx in Plesk works on TCP ports: 80 - http, 443 - https.
  2. Nginx checks if it has the resource already in its cache.
  3. If the resource is cached, Nginx returns the cached content.
  4. If the resource is not cached or if dynamic page (e.g. index.php) is requested , Nginx proxies (forwards) the request to back end server - Apache. Apache in Plesk works on TCP ports: 7080 - http, 7081 - https. Then Nginx caches static content - html, images, js, css. 

Additional information

Exit mobile version