Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 10 of 10 FirstFirst ... 8 9 10
Results 136 to 144 of 144
  1. #136
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    May 2003
    Location
    Ukraine
    Posts
    195
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: nginx for accelerating Apache [Case 41719]

    David, maybe solution is to have several types of user accounts?
    1st type - apache account (like all accounts are now).
    2nd type - nginx account (all pages of this account served by nginx).
    3rd type - something-to-be-added-in-future account

    ?

    All "apache" account files will be served by apache.
    All "nginx" account files will be served by nginx.

    Customers that need fast speed will switch from apache to nginx account's type (reseller or root will perform this switch for them).
    Those customers will be noted that they will loose .htaccess support, custom password support etc.

    So each customer will have possibility to choose what it needs.
    And each root will have possibility to set nginx or apache as primary web-server - all new account will be created with this type of account.

    Is it possible?
    If so - this will be more than GREAT!
    Regards, Alexey

  2. #137
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: nginx for accelerating Apache [Case 41719]

    Quote Originally Posted by AlexAT View Post
    David, maybe solution is to have several types of user accounts?
    1st type - apache account (like all accounts are now).
    2nd type - nginx account (all pages of this account served by nginx).
    3rd type - something-to-be-added-in-future account

    ?

    All "apache" account files will be served by apache.
    All "nginx" account files will be served by nginx.

    Customers that need fast speed will switch from apache to nginx account's type (reseller or root will perform this switch for them).
    Those customers will be noted that they will loose .htaccess support, custom password support etc.

    So each customer will have possibility to choose what it needs.
    And each root will have possibility to set nginx or apache as primary web-server - all new account will be created with this type of account.

    Is it possible?
    If so - this will be more than GREAT!
    Seems much more feasible and less troublesome than the Apache-accelerated by nginx scenario.

    I'm just curious on a technical level, how would one have two daemons serving traffic on port 80 in this scenario? Would there have to be a third daemon to direct traffic, or would this best be handled using "fallthrough" models many proposed where one daemon is the primary and any requests it is not handling simply falls through to the other daemon?

  3. #138
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    May 2003
    Location
    Ukraine
    Posts
    195
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: nginx for accelerating Apache [Case 41719]

    Quote Originally Posted by cPanelDavidG View Post
    Seems much more feasible and less troublesome than the Apache-accelerated by nginx scenario.

    I'm just curious on a technical level, how would one have two daemons serving traffic on port 80 in this scenario? Would there have to be a third daemon to direct traffic, or would this best be handled using "fallthrough" models many proposed where one daemon is the primary and any requests it is not handling simply falls through to the other daemon?
    Best scenario (from experience) - to get nginx as frontend (port 80) and apache as backend (any other port).
    It's very easy to setup and this solution has pretty good performance.

    So all nginx type accounts can be handled directly by nginx - very fast.
    And for all apache accounts nginx should work as clean proxy - also will be very fast since nginx utilize small amount of resources and do it very fast.

    BTW - many cPanel server owners use this way of setup for years. And it'll be good to integrate it officially.
    Regards, Alexey

  4. #139
    Registered User
    Join Date
    Nov 2007
    Posts
    3

    Default Re: nginx for accelerating Apache [Case 41719]

    Quote Originally Posted by cPanelDavidG View Post
    I'm just curious on a technical level, how would one have two daemons serving traffic on port 80 in this scenario?
    What about IP addresses dedicated to nginx or apache. For example, 1.2.3.4:80 would have apache listingin and 1.2.3.5:80 would have nginx listening.
    Only problem I can see with this is that a moving a website from apache to nginx or vice versa would include a change of IP address... Maybe not actually such a good idea.

    Maybe AlexAT's idea is better

  5. #140
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    378
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: nginx for accelerating Apache [Case 41719]

    Quote Originally Posted by AlexAT View Post
    Best scenario (from experience) - to get nginx as frontend (port 80) and apache as backend (any other port).
    It's very easy to setup and this solution has pretty good performance.

    So all nginx type accounts can be handled directly by nginx - very fast.
    And for all apache accounts nginx should work as clean proxy - also will be very fast since nginx utilize small amount of resources and do it very fast.

    BTW - many cPanel server owners use this way of setup for years. And it'll be good to integrate it officially.
    Agreed, this is how most have done it for years. Nginx listening on port 80 and completely handles serving static content and what it can without trouble, and proxies requests to Apache for stuff it cannot handle well or is simply configured to not serve itself.

  6. #141
    Member
    Join Date
    Jan 2010
    Location
    Orlando, FL
    Posts
    47
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: nginx for accelerating Apache [Case 41719]

    Quote Originally Posted by xanubi View Post
    That can be solved with a patch, and that patch is provided in another thread at the central cpanel forum.

    For me i would like to see 3 options:
    1) apache only
    2) nginx + apache
    3) nginx only (with the related phpfm or spawn-fcgi)

    What i'm using now, is nginx+apache, and the results are super, the load is almost zero, where in the past was near 2 and upper.
    I 2nd xanubi on this. . .I think giving 3 separate and distinct options/explanations to the server admin would be incredibly helpful and beneficial. =0)
    Follow me on Twitter!

    - Eric Gillette

  7. #142
    Member
    Join Date
    Oct 2005
    Location
    God's Own Country
    Posts
    17

    Default nginx for accelerating Apache [Case 41719]

    Moderator edit: Forked from post with numerous requests
    I am aware of some cPanel servers which are hosting more than 1500 cpanel accounts. And given that Apache have a larger memory foot print, why we should use it to drive images which need nothing else just a web server ? cpnginx.com is providing such a plugin. So is unixy.net‘s varnish plugin ( this actually is a reverse proxy and caching ).

  8. #143
    Member
    Join Date
    Dec 2006
    Location
    Istanbul / TURKEY
    Posts
    44
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: nginx for accelerating Apache [Case 41719]

    We are very much looking forward to this. Nginx on the frontend and apache on the back would be ideal. Serving static files with nginx is excellent. However there is the problem of .htaccess usage which nginx does not support.

  9. #144
    Member
    Join Date
    Jan 2010
    Location
    Orlando, FL
    Posts
    47
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb Re: nginx for accelerating Apache [Case 41719]

    Actually,

    It is quite easy to get .htaccess files processed.

    In your nginx.conf file, simply add the following line:

    ssi on;

    That will allow your .htaccess files to be processed as usual.

    I know this works for a fact, since I have nginx running on all 9 of my servers, and many of them have .htaccess directives, and they work flawlessly.

    I don't think nginx directly supports .htaccess files, but turning on that directive makes nginx process the files natively through Apache when Apache is on the back-end as in the case of nginxcp.com.

    Works fine for me.
    Follow me on Twitter!

    - Eric Gillette

Similar Threads & Tags
Similar threads

  1. Nginx and Apache wierd logs and ip's
    By ASTRAPI in forum Optimization
    Replies: 1
    Last Post: 09-23-2011, 06:26 PM
  2. Is nginx admin is best nginx plugin for WHM?
    By lowhigh in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 09-14-2011, 12:03 PM
  3. Replies: 6
    Last Post: 08-19-2011, 03:38 AM
  4. Using Lighttpd or Nginx instead of Apache on WHM
    By students in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-18-2009, 02:27 PM
  5. nginx or lighty with apache
    By tom_taylor in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 06-10-2008, 05:27 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube