Hi everyone,
I’ve read many opinions about NGINX with dynamic content versus Apache with dynamic content. I must say that most people feel Apache is a little bit faster than NGINX.
On the other hand NGINX is very often used in the context of static content delivery …
I have both a LAMP as well as a LEMP stack ready and all I have to do is choose between one of them in order deploy my sites.
I will be hosting :
I have dabbled in both Apache and NGINX and I must say that I found NGINX to be easier to configure. It just made more sense to me. However that is secondary. On the other hand, Apache is … well Apache. Using NGINX as a proxy for Apache seems like a ‘complicated’ solution and adds another layer to the setup. Again, some people say it works, some say it doesn’t do much. I guess it all depends.
Now for my question … I would like to get some opinions on what would be a good choice to use. NGINX or Apache ? I can imagine that NGINX with php-fpm is a little slower than apache on the dynamic things, but if there is a traffic spike, maybe NGINX will handle better ? If so, this might be an important thing to consider for me (loosing visitors to time-outs or long request times will cost me). Also … would NGINX be so much slower with dynamic content / php , that it would be noticeable ?
I know that it’s a difficult question to answer, however I would really like to heart, at least some opinions … they might help me with making my choice.
Thanks, Lex
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
To get an Nginx+Apache stack without needing to do the configuration yourself, you might want to take a look at ServerPilot. Here’s how ServerPilot configures things:
https://serverpilot.io/community/articles/how-serverpilot-configures-your-lamp-stack.html
Using this approach gives you the scalability and HTTP/2 benefits of Nginx with the .htaccess and mod_rewrite flexibility of Apache.
the same question came into my mind few days earlier, and what i found after searching so many articles and feedback, it’s a very little improvement on Apache+Nginx over Nginx alone. so my opinion its not worth the hard work.
Nginx as default works good, but you should search for optimization to make your server fly.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.