loading...
Cover image for Your preference between Apache and NGINX?

Your preference between Apache and NGINX?

thomasbnt profile image Thomas Bnt ・1 min read

Hello Practical Devs πŸ‘‹

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

Photo by Taylor Vick on Unsplash

Discussion

pic
Editor guide
 

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.

 

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.