My question is there any advantage using nginx as reverse proxy when most of the content is dynamically generated via php ?
As far as i am concern the nginx is very useful in caching the static content into a cache and serving the multiple requests at once ..
is this true ? or is there any other advantages of the running nginx as a reverse proxy in mostly php driven dynamic content websites ?
If you ask for advantages, you have to compare it to some alternative:) If you use PHP you will always need some webserver anyway, because PHP itself does not have one.
In general Nginx has cool features like:
The only alternative of interest to nginx+php is to use
mod_php
in apache. Here are the main differencesmod_php
, it must proxy a request to a script interpreter; which is eitherphp-cli -b
oruwsgi --plugin php
. nginx can start neither process; you'll need to sort that out on your own.I think this article can be a good explanation of advantages: http://www.aosabook.org/en/nginx.html especially for a slow client case.