3 ms·
Not really. The standard "it depends" answer usually doesn't take personal preference and choice of language into account though. I'm used to seeing the Apache
by billpatrianakos 14y ago
Not really. The standard "it depends" answer usually doesn't take personal preference and choice of language into account though. I'm used to seeing the Apache or Nginx question framed in a way that's all about performance but performance isn't everything.
Nginx configuration will probably feel a little foreign to you because you're used to Apache. There's a bit of a learning curve with Nginx too. Apache modules are something I feel are important and Nginx doesn't really have anything comparable that just works out of the box. Nginx has a large community and good docs so its not like it's hard to Google your way through any issues that crop up bit Apache has more because it's so damn common. So the more obscure the issue the harder it'll be to find the answer compared to Apache.
But then again some platforms work better with and are partial to Nginx. The Rails community is one that I can think of that seems to put a lot of effort into making it easy to run Rails apps on Nginx out of the box. I'd argue that they actually put more effort into supporting Nginx out of the box than Apache. I've heard it's easier to get multiple SSL sites working in Nginx than it is with Apache so if that's important I might look into it.
I think your background is also a factor. I'm not a server guy. I'm a programmer. I write code, put it on a server and would prefer not to get into too much detail with the server configuration. So to me, Apache feels like the better choice because any time I want to use a new framework or anything that's going to run on the server the docs are always written in a way that assumes you use Apache. It's rare that I see setup instructions that include Nginx configurations too. One exception is Passenger which goes out of its way to show you how to use it on both Apache and Nginx. I'm sure that my reasons for choosing one over the other aren't relevant to hardcore server people because they're far more well versed in how server software works than a front end dev or even a backend dev.
I also want to point out that while Nginx is fast out of the box you can still get comparable performance out of Apache. You just have to do a little homework and get your hands dirty in the confit files. I hope my answer wasn't perceived as saying one is better than the other. I just wanted to expand on the standard "it depends" answer because a need for speed and your site's traffic are just the tip of the iceberg.