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!

EasyApache 4 PHP-FPM Status Page

Discussion in 'EasyApache' started by jasperthedummy, Nov 15, 2016.

Tags:
  1. jasperthedummy

    jasperthedummy Registered

    Joined:
    Nov 13, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    SIngapore
    cPanel Access Level:
    Root Administrator
    Hi there,

    I am wondering if there is a way for me to access the PHP-FPM status page of any particular PHP-FPM pool within the WHM interface just like how we can access the Apache Status page as easily within WHM?

    I notice that pm.status_path is currently pointing to /status in all my config files of all my pools. /opt/cpanel/ea-php54/root/etc/php-fpm.d/[domain].conf :
    Code:
    pm.status_path = /status
    Allowing for this will enable me to easily monitor the usage of all my pools:
    Code:
    pool:                 www
    process manager:      dynamic
    start time:           17/May/2016:13:54:02 +0530
    start since:          886617
    accepted conn:        1619617
    listen queue:         0
    max listen queue:     0
    listen queue len:     0
    idle processes:       28
    active processes:     2
    total processes:      30
    max active processes: 31
    max children reached: 0
    slow requests:        0
    An added bonus will be if the page can show with the /status?full option to allow me to view more details on the processes within the pool.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,197
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    There's no feature in WHM to show the PHP-FPM status page at this time. I encourage you to submit a feature request to allow for that functionality via:

    Submit A Feature Request

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dhultin

    dhultin Registered

    Joined:
    Feb 22, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    I was messing around with this today and this is a pretty simple thing to do. I added this to my domains configuration in httpd.conf with Easy Apache4. You could likely make an include file for this instead. The proxy_fcgi_module section already exists. I added <LocationMatch>

    <IfModule proxy_fcgi_module>
    <FilesMatch \.(phtml|php[0-9]*)$>
    SetHandler proxy:unix:/opt/cpanel/ea-php56/root/usr/var/run/php-fpm/c71e80857422fac3e2c4db73c2eb615bedb15678.sock|fcgi://disc4life.com/
    </FilesMatch>
    <LocationMatch "/(ping|status)">
    order deny,allow
    deny from all
    #allow from 10.20.4.4
    allow from 10.20.4.0/22
    SetHandler proxy:unix:/opt/cpanel/ea-php56/root/usr/var/run/php-fpm/c71e80857422fac3e2c4db73c2eb615bedb15678.sock|fcgi://disc4life.com/
    </LocationMatch>
    </IfModule>

    Now I can visit /status and /status?full or /ping on my domain and it shows the FPM status for my domain. Rules are here to deny / allow access as well based on IP. Good luck.
     
    cPanelMichael likes this.
  4. Hosted Power

    Hosted Power Member

    Joined:
    Sep 11, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    cPanel Access Level:
    DataCenter Provider
    Any update on this? We would like to have a supported method as well!
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,197
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    There's no update at this time, however I encourage you to vote and add feedback to the existing feature request for this at:

    EasyApache 4 PHP-FPM Status Page for Individual Pools

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Alesak

    Alesak Registered

    Joined:
    Oct 5, 2018
    Messages:
    1
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sydney
    cPanel Access Level:
    Root Administrator
    There is pretty easy way to achieve this without much configuration:
    1. add or change status path to end with .phtml like, you may add pm_status_path: /status.phtml to /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml
    2. than rebuild FPM configuration files with /scripts/php_fpm_config --rebuild
    3. than create file status.phtml in each website root with simple content like <html></html> ,file must exist so the request is forwarded to FPM
    4. to finish just restart PHP-FPM daemons
    Now you will be able to see status page like http://example/status.phtml
     
    cPanelLauren and vacancy like this.
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