Continue with NGINX or switch to Apache ?

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 :

  • a pretty simple Wordpress blog,
  • a few hundred static pages, which will be updated maybe daily as well (not through WP, but for instance through dreamweaver).
  • I will will also be installing a PHP script application which uses MySQL heaily on the same server (or maybe a different one if necessary).
  • This is supposed to happen on a 4G server, which I might upgrade later on.

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

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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:

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.