DEV Community

Cover image for Your preference between Apache and NGINX?
Thomas Bnt ☕
Thomas Bnt ☕

Posted on

Your preference between Apache and NGINX?

Hello Practical Devs 👋

  • What do you like about Apache and NGINX?
  • What are their strongness and weakness?

Photo by Taylor Vick on Unsplash

Top comments (2)

ahferroin7 profile image
Austin S. Hemmelgarn

I'm partial to Nginx for a couple of very specific reasons:

  • The configuration syntax is easier to parse mentally and a bit harder to get wrong when you are writing files by hand.
  • The core is a bit more lightweight.
  • It has fewer external dependencies compared to Apache when installing it on a fresh install of most Linux distributions (which translates to faster installs and updates in most cases, as well as less potential attack surface).

The single biggest disadvantage IMO is how Nginx handles modules. You essentially have to rebuild the whole thing to build another module, versus Apache making it somewhat easier to build an out-of-tree module.

mjraadi profile image
Mohammadjavad Raadi

I used to use Apache for WordPress and Laravel projects. These days I'm mostly using nginx as a reverse proxy and load balance for sysops tasks. I like them both.