16

Quick question:

Apache or Nginx?

Currenly I'm using Apache in Ubuntu server running in Virtual box but I was wondering if it's worth switching to Nginx :)

Comments
  • 10
    I hear it’s faster, but I’m still an Apache guy.
  • 6
    It depends. For production, yes. But if it’s for personal use and you know apache, no; you probably won’t feel a difference
  • 8
    Whatever fits you. It most likely does not matter if you don't serve thousands of requests per second. If you do you should already know
  • 6
    I mostly use NginX on my hosts and apache on my vps's which run on those hosts! But I personally prefer NginX :)
  • 5
    Apache. Because easier configuration.
  • 8
    Default Apache configuration is vulnerable to Slow Loris attacks, Ngingx does not have this problem.
  • 5
    I prefer Nginx but have tried both and some others.
  • 1
    what exactly would you like to run?
  • 2
    @olback chosing a software on one known easily fixable problem is a surefire path to regret.
  • 1
    I'm using nginx for serving backend in Python and frontend in React...
  • 5
    This relies on what you want to do.
    Normally I use them under these circumstances:
    Average servers, developing: Apache
    High performance servers: Nginx
    Integrated/small machines like Raspberry or tiny vservers: Lighttpd
  • 2
    Nginx is much faster and does not need such powerful HW, so I would use it for productikn, but I find Apache more user friendly with its .htaccess which I like way more than writing complex configs for Nginx, so I use Apache as my testing server.
  • 2
    Thanks all for sharing your opinions.
    I think I'll stick with Apache for now, 'cause everything I develop is still very lightweighted!
  • 2
    It depends on your use case.

    Apache is great but doesn't fair under heavy loads since it opens a new thread for every connection.
  • 4
    I use nginx most of all because I prefer its configuration files, more readable than Apache ones.
  • 6
    Apache is a swiss army knife. Fully loaded.

    nginx is a gun. Does a single job, but do it best.
  • 2
    They’re both great, but if i can choose between JSON and XML, i’ll pick JSON...everything apache just has that legacy vibe πŸ˜‚
  • 2
    @filthyranter I always see the "Apache is easier" argument, but once I switched to Nginx I've had fewer headscratching moments. Nginx conf reads like a children's novel to me in comparison.

    But my answer would be: Don't bother, you're a dev so go write code, hire a sysadmin πŸ™ƒ

    Still useful to grasp the basics though.
  • 1
    Once you tune apache a bit (mpm event with php-fpm) it's actually quite performant. Though that isn't necesarily something for everyone.

    With such a setup the difference between nginx (with php) and apache 2.4 isn't that great at all.
  • 1
    NginX❀
  • 0
    @Ashkin @linuxxx god, that way of writing NGINX triggered me... why the big N and X? Their product name is NGINX. So either write it correctly or don’t bother with capitalisation

    trigger.end();
  • 0
    @rc5-asdf I think it can be useful to run your local dev environment in a way that closely resembles production. That way you can prevent embarassing "but it worked on my machine"-moments.
  • 1
    @ChainsawBaby iirc that's how their documentation spells it. I rather agree though πŸ˜…
  • 0
    @Ashkin I’ve only seen nginx and NGINX in their documentation. And when I speak with the NGINX team they always write NGINX
  • 1
    @ChainsawBaby @Ashkin I mix it all over the place and just don't care ;)
  • 0
    I also went with nginx a few weeks ago, but the configuration was very unusual.
  • 1
    Ever heard of the Slow Loris DOS on apache?
  • 0
    Every time some says apache, a part of me dies
  • 0
    @JFK422 Which you can avoid by changing your config
  • 2
    @marcus5914 Apache apache apache apache apache apache
  • 3
    @filthyranter Marcus is dead now
  • 2
    @localjoost R.I.P my soul.
Add Comment