Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx and Apache

Tags:

php

nginx

apache

is it useful to server static data using Nginx(Images,css,js) and dynamic data (App code+database) using Apache ?

like image 588
webkul Avatar asked Dec 27 '10 17:12

webkul


1 Answers

Not only is it useful to have Nginx serve static images, but having Nginx proxy to Apache is a big win as well. This is because slow clients cause Apache to keep threads busy for longer than needed. Nginx can deal with the slow client and allow Apache to finish the request as fast as possible, freeing the thread (and memory) for other requests. Nginx will accept the request as fast as your local connection will allow, and trickle the response back to the slow client.

like image 86
cliff.wells Avatar answered Sep 28 '22 00:09

cliff.wells