Nginx – Any advantages of using nginx as a reverse proxy server in mainly php driven dynamic non-static webites

apache-2.2nginxPHPreverse-proxy

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 ?

Best Answer

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:

  • you mentioned, there are many ways how you can implement caches in Nginx
  • it provides a lot of flexibility due to a big set of modules, especially mod rewrite or mod lua
  • very low on overhead (memory/cpu) compared to alternatives like Apache or Zeus webservers
  • helpful community to answer questions
  • is under active development, so new features come out all the time. f.e. spdy