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.

Apache equivalent to "PHP suEXEC Max Connections" from LiteSpeed

Discussion in 'Security' started by GaryT, Aug 25, 2010.

  1. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    I used to have litespeed on the VPS and it had an option in there called:

    PHP suEXEC Max Conn

    It basicly limited the amount of processes a user can have, Now I can't afford the licence now as it will cost me a bomb for an 8core cpu - So Im wondering is there an option whats not in litespeed to use such option ?

    Thanks in advance.

    Anyone :rolleyes:
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I'm not familiar with how LiteSpeed implemented the described option; however, as a starting point, I would consider using both suPHP and suEXEC and then I believe you may effectively restrict the number of per-user processes by customizing the Linux pam_limits configuration located at the following path:
    Code:
    /etc/security/limits.conf
    The following command may be used to view help information about configuring limits.conf for pam_limits:
    Code:
    # man limits.conf
    For additional reference I recommend the following PAM documentation resources:
    A Linux-PAM page
    Linux-PAM FAQ
    The Linux-PAM Administration and Developer Guides
    The Linux-PAM System Administrators' Guide

    To determine if suEXEC and suPHP are enabled or disabled you may use WebHost Manager (WHM) via the following menu path:
    WHM: Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration

    Alternatively, the status of suEXEC and suPHP can also be viewed or set via root SSH access using the following commands:
    Code:
    /usr/local/cpanel/bin/rebuild_phpconf --current
    /usr/local/cpanel/bin/rebuild_phpconf --help
    Documentation: Configuring PHP and suEXEC from the Command Line
     
  3. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    First off, Thank you for the reply and I'm sorry for posting in the wrong section !

    Regarding your answer, I was already looking into:

    I'm unsure on what to actually edit/change to be perfectly honest with you, In this conf at the bottom I see:

    I assume this is it, Just unsure which is actually which, I did google for some information but I found it very confusing.

    Thanks once again and anyone else who wishes to help me I would appreciate it.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,475
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  5. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    I already checked that through google search. Thanks !

    It does not state though that if you decide to put a limit in place what line / Place to edit the limit.

    It just says, If you decide to read the following examples.
     
  6. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    I also asked on Litespeed forums - One of there techs replied:

    Obviously they will not say as its part of a product they use, Now at the moment it has no affect on my server without this intergrated, But I can see processes building up so a nice limit of 4/5 would be nice rather than the default of 20 whats been put in place somewhere. :)
     
    #6 GaryT, Aug 29, 2010
    Last edited: Aug 29, 2010
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,475
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Well, it gives you the examples, but above that also details what each variable is you might use, or not. Those not being used in the default config you've posted above have the # in front of them.

    Not sure exactly what you're wanting to do here, if you can be more specific it might help someone to offer more suggestions.
    In WHM > Apache Configuration > Global Configuration you'll find some settings for several things that might be helpful to whatever it is you want to restrict.

    There is also in WHM > Apache Configuration > Memory Usage Restrictions tool and of course there's ConfigServer Security & Firewall which if setup correctly can block IPs automatically if too many connections from the same IP setting is met.

    As a few examples. :)
     
  8. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    Main >> System Health >> Show Current CPU Usage

    Click on a PID to View More Information about a process

    Some account I host have around 20 or more processes. Now the litespeed addon was able to limit this, I do not have litespeed so I was wondering how to put limits in place.

    Sorry if I explained this completly wrong and thanks for your reply.
     
    #8 GaryT, Aug 29, 2010
    Last edited: Aug 29, 2010
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,475
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Can you post a snip of one of those processes you're looking at?
     
  10. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    [​IMG]

    I cannot show any user info due to privacy protection, However I can confirm there is 1 user there with 13 active processes, Litespeed could limit this so there must be some intergration where I can limit this without litespeed, On there module I had it set to 1 / 3 so it could use between those limits which it did stick by and ran like a dream but, Due to growing faster than I thought I had to get the new box and the price of litespeed is, erm, expensive :D

    as for the edit for limitation, where, Im unsure :rolleyes:
     
    #10 GaryT, Aug 29, 2010
    Last edited: Aug 29, 2010
Loading...

Share This Page