Increase web server performance: we put nginx in front of apache

In one of the notes we described how to configure nginx + php-fpm. But nginx can be used in a slightly different way. For example, if you don't want to completely abandon apache, but you want to speed up the web server. (Perhaps you have implemented a complex redirect system that you don't want to port to nginx).

In this case, a possible solution is to use nginx only for serving static files (images, css, js, etc.). Other requests (to the php engine, for example) will still be redirected to apache (assuming you already have a site configured to work with it). To do this, configure nginx to serve static files, and proxy all other requests to apache. (In this case, you can do without php-fpm).