Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

"All PHP Options + OpCache" PHP Handlers is cgi actually FCGI?

Discussion in 'EasyApache' started by mikefromnz, Mar 3, 2017.

Tags:
  1. mikefromnz

    mikefromnz Active Member

    Joined:
    Feb 9, 2017
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New Zealand
    cPanel Access Level:
    Root Administrator
    Hi guys

    I run a shared hosting server and am using All PHP Options + OpCache in EasyApache.

    I see it has proxy_fcgi, although in the PHP Handlers I only see option for SUPHP or CGI.

    Am I right in assuming because mod_proxy_fcgi is part of the options package, when choosing CGI, it's actually running Fast CGI (for OpCache etc)

    And in this configuration is it secure, or am I best still to forget opcache and just use SuPHP handler, or even PHP-FPM manually on each site?
     
  2. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    179
    Likes Received:
    22
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Proxy_fcgi only applies to php-fpm. It can not be used as a handler. Proxy_fcgi + php-fpm + suphp configuration is suitable. But in order to use php-fpm, php-fpm must be activated manually after the php version for each site has been set.

    The mod_fcgid component must be loaded to use the fcgi handler. But mod_fcgid does not support multi php and php-fpm.
     
    mikefromnz likes this.
  3. mikefromnz

    mikefromnz Active Member

    Joined:
    Feb 9, 2017
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New Zealand
    cPanel Access Level:
    Root Administrator
    Thanks for that, I can't understand why it has to be set manually as it seems so much better.

    I can't see any way to install fcgid (it simply does not exist in EasyApache) although I guess I don't need it.

    For sites not using PHP-FPM (as in default config, seen FPM can't be the default), would I be better off using SuPHP or CGI in the PHP Handlers (keeping in mind I have SUEXEC etc
     
  4. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    179
    Likes Received:
    22
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Yes php-fpm is much better.

    But doing so manually on servers that have multiple accounts is making it difficult.

    A request has been made about this subject, but there is no improvement yet. Maybe we will see v66.

    mod_fcgid document

    Apache Module: FCGId - EasyApache 4 - cPanel Documentation
     
    mikefromnz likes this.
  5. mikefromnz

    mikefromnz Active Member

    Joined:
    Feb 9, 2017
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New Zealand
    cPanel Access Level:
    Root Administrator
    Any issues with simply enabling PHP-FPM for everyone? is it more resource hungry or something? trying to understand why it cant be default.

    And also not sure if you saw but...

     
  6. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    179
    Likes Received:
    22
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Cgi handler suexec does not work well, always suphp should be preferred.

    I am using fastcgi_proxy + php-fpm + suphp, I am very satisfied. The only problem is that we deal with each site manually as we talked about before. I do not know the difficulties in this issue, it is really hard to do or I am wondering if it is seen as an unnecessary feature by cPanel.

    But this is the most important thing right now.

    You can follow the link.
    PHP-FPM enabled by default on account creation
     
    #6 vacancy, Mar 3, 2017
    Last edited: Mar 3, 2017
    mikefromnz likes this.
  7. mikefromnz

    mikefromnz Active Member

    Joined:
    Feb 9, 2017
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New Zealand
    cPanel Access Level:
    Root Administrator
    Hey thanks for being super helpful :) so I guess seen I am doing shared hosting, leave system on SuPHP as handler to keep security when new accounts added, then manually adjust them to PHP-FPM as soon as possible :)
     
    vacancy likes this.
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It looks like your questions have been answered. Feel free to let us know if you have any concerns.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice