0

My understanding is that Nginx is good at rapidly delivering static content but requires Apache to deliver dynamic content. I am only a few hours into Nginx right now so I suppose my understanding is terribly flawed. However, I am reading this to mean that such a stack would deliver little by way of performance and load handling benefits for a site that serves up a very high proportion of dynamic content since Nginx would push any request that involves running a PHP script back to Apache?

I would much appreciate any clarifications

1
  • 1
    Also and this is an opinion (based on experience though), unless you want to use Apache for legacy reasons or there's a particular module without equivalent in Nginx or you are really familiar with apache and don't want to learn nginx, there's no reason to start using apache and it's better to use nginx instead for reasons of performance and use of less resources. Mar 22 '14 at 15:20
2

"(nginx) requires Apache to deliver dynamic content." - No, Nginx can also deliver dynamic content besides acting as a proxy for another backend like Apache.

2
  • So when does Ngnix need to call on the help of the Apache backend. I had gathered that one of the major benefits of Ngnix is that it doesn't spawn a new thread to deal with each new request. Can I still use memCached with Ngnix?
    – DroidOS
    Mar 22 '14 at 15:24
  • 2
    Nginx "needs" an apache backend for the reasons in my other comment: when you already have an apache server configured that you don't want to migrate to nginx. You're right that due to Nginx threading model, RAM consumption is constant unlike Apache which increases with more connections, thus making nginx specially suitable for VMs with limited memory. You can use memcached or any other layer that you use with apache with nginx, it's another web server only more powerful (can do load balancing etc). Mar 22 '14 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.