Skip to main content

Introducing EasyApache’s Optimal Profiles

Comments

46 comments

  • markb14391
    Also, I noticed that this profile disables mod_qos, which we use for DDoS protection. Is there a suggest replacement which is compatible with the profile?
    0
  • markb14391
    And I've read that APC can't be used reliably with MPM ITK. Is that correct? Thanks.
    0
  • KurtN.
    [quote="markb14391, post: 1688712">Also, I noticed that this profile disables mod_qos, which we use for DDoS protection. Is there a suggest replacement which is compatible with the profile?
    The developers of ModQos (and EasyApache) explicitly state that ModQos should be used with MPM Worker. EasyApache doesn't have any alternatives for this module at the moment.
    0
  • 4u123
    I'm hoping someone who has switched to to ITK can confirm that $_ENV is not working with PHP 5.4
    0
  • markb14391
    Hmm, after compiling with the ITK profile, at the end of EasyApache the PHP handler is set to cgi. Shouldn't this default to DSO? Should I set it to DSO? Or am I wrong in assuming that? Elsewhere in documentation it says that compiling with ITK will set your handler to CGI if you select ITK in the short options list. Not sure what that would matter. Which is correct? Thanks, Mark
    0
  • markb14391
    Hmm, found more info in some deep deep undercover cPanel documentation. ;-) [QUOTE]CGI The CGI handler provides the version of PHP you select through mod_cgi or mod_cgid. If you enable suEXEC, you will be able to see which virtual host has made the PHP request. A virtual host allows you to host multiple domains from a single IP address. The owner of a virtual host will be the same as the account name. However, if you disable suEXEC, your server will serve the PHP request as the nobody user. We recommend that you only use the CGI PHP handler if you are unable to use any of the other PHP handlers, or if you build EasyApache with the MPM ITK option. Unless you use MPM ITK, this method is not fast nor secure, regardless of whether you enable suEXEC.
    So it looks like CGI is what we're supposed to use? I'd still like further confirmation if possible. Thanks! Mark
    0
  • markb14391
    I asked the same question in a cPanel ticket. Here was the reply: [QUOTE]I would recommend that you update your handler and I believe that DSO with mod_ruid2 would be a good handler for the MPM ITK Profile.
    ???
    0
  • 4u123
    [quote="markb14391, post: 1691952">I asked the same question in a cPanel ticket. Here was the reply: ???
    When I used the ITK profile it set the PHP handler to DSO automatically. I'm scrapping this idea. I've just looked at the compatibility matrix on the CloudLinux website and it shows if you use ITK, or Ruid2 there is no memory limiting functionality, or PHP selector. [url=http://docs.cloudlinux.com/index.html?compatiblity_matrix.html]CloudLinux Documentation There doesn't seem to be one configuration that allows for all the features of Cloudlinux / CageFS, plus a faster running PHP environment that doesn't require a lot of extra work, or that doesn't cause problems with the end user. I'm staying with prefork / suPHP as this has always been the most stable under CloudLinux.
    0
  • markb14391
    Yeah. CL told me that some of their documentation is a bit outdated, and their new mod_lsapi does fully support MPM ITK. However I'm not sure if that means that some of the other limitations are still in place, or all resolved. Based on the lack of info about this, and the lack of consistent info from cPanel, we're also staying away from MPM ITK. We've been using FastCGI with MPM worker (so we can benefit from opcode caching), so we'll stay with that for now. Not impressed with the MPM ITK profile rollout, lack of consistent info from cPanel, lack of reliable responses from cPanel, etc. (I mean, telling me to use DSO WITH mod_ruid2 WITH MPM ITK...)
    0
  • ScottTh
    Thank you all for your helpful feedback about ITK and its rollout. We are gathering up your ideas in order to decide what changes we need to make. That could mean a change to the PHP handler order, documentation updates, or both. We will update this thread when we have a completed our research and have a solution at hand.
    0
  • 4u123
    [quote="markb14391, post: 1691582">Hmm, after compiling with the ITK profile, at the end of EasyApache the PHP handler is set to cgi. Shouldn't this default to DSO? Should I set it to DSO? Or am I wrong in assuming that? Elsewhere in documentation it says that compiling with ITK will set your handler to CGI if you select ITK in the short options list. Not sure what that would matter. Which is correct? Thanks, Mark
    I've noticed that sometimes when you run EasyApache it doesn't always set the handler. For example, when I switched back to suPHP from DSO, the handler remained at DSO and I had to manually change it.
    0
  • cPanelDon
    [quote="markb14391, post: 1691952">I asked the same question in a cPanel ticket. Here was the reply: [QUOTE]I would recommend that you update your handler and I believe that DSO with mod_ruid2 would be a good handler for the MPM ITK Profile.
    ???
    Using DSO as the PHP handler should work well with MPM ITK, equivalent to using DSO with RUID2, but not both ITK and RUID2 simultaneously. What was your ticket number?
    0
  • KurtN.
    [quote="4u123, post: 1692021">When I used the ITK profile it set the PHP handler to DSO automatically. I'm scrapping this idea. I've just looked at the compatibility matrix on the CloudLinux website and it shows if you use ITK, or Ruid2 there is no memory limiting functionality, or PHP selector.
    Apache 2.2 and 2.4 comes with the following per-virtualhost configuration directives to ensure applications running under it do not violate memory and process limitations: [LIST]
  • RLimitCPU
  • RLimitMEM
  • RLimitNPROC
  • 0
  • KurtN.
    [quote="4u123, post: 1688661">A customer has pointed out that since we switched to this MPM they are unable to get anything returned when using $_ENV For example, [PHP] echo $_ENV["DOCUMENT_ROOT">;[/PHP] Returns nothing But, using getenv works fine. [PHP]$root = getenv("DOCUMENT_ROOT"); Echo $root;[/PHP] Edit: wanted to add that the php.ini setting "variables_order" is set correctly on this server to include "E" - the most common reason the ENV array comes up empty is because this is missing - so I wanted to clarify that this is not the problem here. I'm hoping someone could take a couple of minutes to reproduce this issue.
    This is not an artifact of the Apache MPM ITK. When running PHP with the DSO handler, the DOCUMENT_ROOT variable isn't contained in the $_ENV array. Instead, it's under the $_SERVER array. Conversely, when running PHP with the CGI handler, the DOCUMENT_ROOT variable is in both $_ENV and $_SERVER arrays. This is a development issue in the wild that is commonly brought up by PHP developers. For more information, please read PHP's web page located: here.
    0
  • patchwork
    I must admit I was disappointed when I logged in to see the profiles, I was expecting more of them. I would like to have seen a few profiles such as Apache 2.2 + php5.4 + xcache + best security Apache 2.4 + php5.5 + opcache + best security Maybe even have a profile wizard that selects compatible options, something like step 1 -- select apache version step 2 -- select php version step 3 -- do you want a php cache? the compatible options are, xcache, opcache ..... step 4 -- the best compatible security for this setup is Mod Ruid2 step 5 -- based on your selections we suggest MPM Prefork After finishing we suggest you select the PHP 5 Handler DSO, and enable Apache suEXEC. I've recompiled Apache a lot of times trying to get a good php/cache/security setup. Pete
    0
  • ScottTh
    Thank you for the suggestions, Pete. It's this kind of information that helps us create new profiles that EasyApache admins want.
    0

Please sign in to leave a comment.