Apache, Nginx, Lighttpd?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Emil
    Confirmed User
    • Feb 2007
    • 5658

    #1

    Apache, Nginx, Lighttpd?

    What would be the best option? I have some TGPs, forums and lots of Wordpress blogs.

    No site is getting that much traffic except the forums that receive about 50k pageviews/day.
    The blogs get about ~9k uniques/day.

    And this server:
    Core2Quad Q8200 QUAD CORE 2.33GHZ - RAM: 4GB

    What should I choose of Apache, Nginx or Lighttpd and why?
    Last edited by Emil; 02-07-2012, 11:00 AM.
    Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.)
    (Signup with ONLY your Email and Password. You can also refer people and get even more.)
  • mafia_man
    Confirmed User
    • Jul 2005
    • 1965

    #2
    Nginx because the defaults it comes with are good. You need to know how to config it though, use php-fpm for PHP.

    4 worker processes and 1024 worker connections should be fine.
    I'm out.

    Comment

    • mikke
      Confirmed User
      • Jan 2010
      • 1327

      #3
      nginx as reverse proxy for apache2,
      apache2 with php5 and few mods,
      hit me up on icq if you need help to configure it..
      icq: 395 294 346
      http://www.adultsubmitter.eu - submit any adult site to 20 directories from 1 form!
      now 20 domains!
      http://www.porndeals.eu http://www.ebonybangbros.com

      Comment

      • Klen
        • Aug 2006
        • 32235

        #4
        I use nginx and php-fpm,dont bother with load since i using it.Also i just checked some benchmarks to see did something changed in the meantime and nginx still beats everything else when it come to speed and resource usage.

        Comment

        • AdultEUhost
          ORLY?
          • Oct 2005
          • 2579

          #5
          assuming you have a managed server I would go a different route

          1) setup optimized apache/php5 for the main sites (strip the modules and tweak the fork)

          2) setup lighttpd/nginx for your forum attachments/uploads and all other static files

          If you can't or don't want to do that pick nginx for everything.
          ICQ: 267-443-722 / leon [at] adulteuhost [dotcom]

          Nominated for an XBIZ Award as "Webhost of the Year" in 2007, 2012, 2013 and 2014

          Comment

          • raymor
            Confirmed User
            • Oct 2002
            • 3745

            #6
            Nginx and lighttpd have some pretty fervent fans who like to argue, so I won't get into taking too much about either of them, but I'll just tell you what we did after pretty extensive testing on a site doing 400 Mbps (120,000 GB / month).

            Add "noatime" to /etc/fstab . This is very important.

            In Apache, comment out the twenty or so modules you're not using, like mod_speling and mod_auth_group.

            Enjoy a server that is as fast as your disks can spit out files, standards compliant, and doesn't have grotesque bugs from six years ago still not fixed.
            For historical display only. This information is not current:
            support@bettercgi.com ICQ 7208627
            Strongbox - The next generation in site security
            Throttlebox - The next generation in bandwidth control
            Clonebox - Backup and disaster recovery on steroids

            Comment

            • Klen
              • Aug 2006
              • 32235

              #7
              Originally posted by raymor
              Nginx and lighttpd have some pretty fervent fans who like to argue, so I won't get into taking too much about either of them, but I'll just tell you what we did after pretty extensive testing on a site doing 400 Mbps (120,000 GB / month).

              Add "noatime" to /etc/fstab . This is very important.

              In Apache, comment out the twenty or so modules you're not using, like mod_speling and mod_auth_group.

              Enjoy a server that is as fast as your disks can spit out files, standards compliant, and doesn't have grotesque bugs from six years ago still not fixed.
              What if you need atime,wbat then ???

              Comment

              • raymor
                Confirmed User
                • Oct 2002
                • 3745

                #8
                Originally posted by KlenTelaris
                What if you need atime,wbat then ???

                If you need atimes and so can't use noatime, consider if relatime will work for you. If you do need atimes, you can NOT use nginx because it causes atime updates to be skipped whether you like it or not. That's why in tests with atimes on it appears faster on small files - because it's (erroneously) skipping atime updates.

                That's how we found out about the importance of noatime. Analyzing the nginx code to see why it appeared to be faster for tiny files, I found that the only significant speed difference was skipping that disk access, even if the server admin had specified otherwise.

                If you have to have atimes and relatime won't work, then, you need a server which allows atimes to be updated correctly (Apache) and a storage subsystem with low rotational latency (high RPM) and low seek times.
                Last edited by raymor; 02-07-2012, 02:50 PM.
                For historical display only. This information is not current:
                support@bettercgi.com ICQ 7208627
                Strongbox - The next generation in site security
                Throttlebox - The next generation in bandwidth control
                Clonebox - Backup and disaster recovery on steroids

                Comment

                • mikke
                  Confirmed User
                  • Jan 2010
                  • 1327

                  #9
                  Originally posted by AdultEUhost
                  assuming you have a managed server I would go a different route

                  1) setup optimized apache/php5 for the main sites (strip the modules and tweak the fork)

                  2) setup lighttpd/nginx for your forum attachments/uploads and all other static files

                  If you can't or don't want to do that pick nginx for everything.
                  why would you like to setup another instance of web server for static files like images/css/js? it's waste of money and time..
                  why making another dns request and forcing user to connect to another host?

                  all what you need is nginx, you have choice between:
                  * nginx+php5fpm
                  * nginx as reverse proxy + apache2

                  now.. you are turning on in nginx config:
                  * expires for static files
                  * all files are serving direct from hdd, not by requesting apache2
                  * memcache for all dynamic sites where user is not logged, with expiry time like 5sec..

                  i choosed second setup (reverse proxy) and my box - 2x3ghz, 4gb of ram is handling dynamic site with over 400 users online (via google analytics realtime), near 350k page views per day and like 1.3mln hits per day.. load time? less than 1s..
                  icq: 395 294 346
                  http://www.adultsubmitter.eu - submit any adult site to 20 directories from 1 form!
                  now 20 domains!
                  http://www.porndeals.eu http://www.ebonybangbros.com

                  Comment

                  Working...