The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

nginx or lighty with apache

Discussion in 'EasyApache' started by tom_taylor, Jan 26, 2007.

  1. tom_taylor

    tom_taylor Active Member

    Joined:
    Nov 30, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Warrington, UK
    Hiya

    OK im still not satisfied with apache being pretty slow and inefficient.

    I'm going to run either nginx or lighttpd (as they are light httpd's) and have it do all the work with php in fast-cgi mode.

    Then ill spit it back to apache through a back-end proxy connection, so the end user will only ever hit apache.

    For this to work, one of the two light httpd's will need to have virtual hosts set-up the same time apache does during an account creation and when they are removed.

    As nginx supports .htaccess files and lighty doesn't, would be handy to add specific config for that sites virtual hosts section through cpanel (although this isnt required, as i can just edit the main config file for now.)

    Also could create a new section under software to compile one of the light servers, or it could be recompiled along with apache.

    I think this would further improve the server, and this kind of change or addition would bennefit everyone

    Thanks

    Tom
     
  2. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    I am running nginx as a proxy/load balancer (was using pound and switched to nginx) in front of apache. The reason for this is to be able to use mongrel_cluster for my ruby/rails applications (fastcgi has to many problems). If all that you are hosting is php than I don't really see the advantage. Apache is a proven world class server where enginx is a new kid on the block gaining lots of interest recently mainly because of ruby/rails and mongrel (and apache1.3 lack of support for proxy and load balancing...or you could say cpanle's lack of support for apache2.2).

    nginx is developing very fast, with almost daily new releases. The configuration file is straight forward, even I could understand it. This looks like it will be a great option for web servers but it will take much time for it to become mainstream. For now it is THE choice for ruby/rails developers (you are not cool unless you use nginx and mongrel_cluster). Be prepared to hear more about this eastern block server. :D
     
  3. tom_taylor

    tom_taylor Active Member

    Joined:
    Nov 30, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Warrington, UK
    Well the idea is that Nginx and Lighttpd can handle more requests under load than apache, and the performance and speed improvements too are fantastic compared to apache (with regards to php under fast-cgi mode, and for streaming flv files similar to google and you tube).

    It will prob's be best to use lighty , as it seems Nginx is geared more towards a dev environment (even though Nginx is by far the fastest httpd).

    Suppose it depends on what people want on their server running whm and what they use it for. Would be nice for users to have a choice though through cpanel though to work with or instead of apache :)
     
  4. mobyhost

    mobyhost Registered

    Joined:
    Dec 11, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Exellent idea :) may be somebody can share experience? How this all to make?:confused: now i think about one method - set at cron script which will rescan every 5 minute httpd.conf and make changes in config of ngnix ?:)
     
  5. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Hi. Has anyone managed to get lighttpd running? With Apache? Using modules? With fastcgi? And experienced meaningful performance gains? Is it worth the effort to install and maintain something that is not supported by WHM itself?
     
  6. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    I hate to say this but lighttpd and nginx are interesting ideas and probably fun to toy with but you will never, ever see them catch up to what apache can do and will never have a fraction of the support and modules.

    If performance is the issue and you own the boxes you run on then it might be best to do a "microsoft solution" of throwing hardware on a software problem. What I mean is that its easier and now cheaper to throw incredible muscle at the web server for to get the performance increase you need rather than to have some poorly supported program re-invent the wheel. With dual and quad core processors, huge amounts of ram and lightning fast hard drives it is likely easier to go the hardware route than to go with lighttpd and hope it will one day become mainstream. I mean just go to www.netcraft.com and scroll down to the "Market Share for Top Servers Across All Domains " graph and try to find the lighttpd line. ;)
     
  7. kmike

    kmike Registered

    Joined:
    Dec 30, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Funny, less than 6 months passed and nginx is at the 5th place with over 2 million sites, followed closely by lighttpd with 1.5 million:
    http://survey.netcraft.com/Reports/200806/

    Anyway, I just wanted to share a working implementation of "nginx as a reverse proxy before Cpanel's Apache" schema:
    http://figvam.blogspot.com/2008/05/using-nginx-to-accelerate-apache-on.html
    Some limitations still apply though.
     
Loading...

Share This Page