By default, the Apache web server works in conjunction with nginx. The
benefits are that web pages load faster and server resources are saved.
To learn how Apache and nginx collaborate by default, see Apache with
nginx.
For any website, you can change the default method of Apache and nginx
collaboration. More exactly, you can:
- Specify whether nginx must work as a proxy for Apache or as an
independent server for handling all HTTP requests to websites. - Specify which type of web content (static or dynamic) must be
processed by each of the servers if you use nginx as a proxy server.
Such settings can help optimize the performance of highly loaded web
applications that have a lot of dynamic content (PHP files) or a lot of
static content.
The corresponding UI options are available in the Customer Panel in
Websites & Domains > <domain_name> > Apache & nginx Settings.
Note: nginx-related settings are available only if nginx is turned on.
The diagrams below show all the possible configurations for Apache
working in conjunction with nginx, and provide comments on pros and cons
of each configuration. Note that if you use nginx alone, no requests can
reach Apache.
Processing Static Content
The following table shows how Plesk handles the request for a 2KB GIF
image file depending on the nginx configuration.
Smart static files processing is turned on |
It is the optimal configuration in terms of performance and The request is passed to Apache which returns only a file |
…