Apache and Nginx together, why? Apache and Nginx together, why? nginx nginx

Apache and Nginx together, why?


Nginx is faster and lighter, but many people find it easier to work with Apache because of .htaccess support (Nginx does not have an analog due to performance concern).

The typical scheme is following: you bind Nginx on port 80, configure it to serve static files (jpg, png, js, css, ttf, etc.), and make it proxy to Apache on, say, port 8080 for non-static resources. Apache in turn has abovementioned .htaccess support which allows you to apply rewrite rules and other stuff without webserver reload.