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.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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!
     
  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.
Loading...

Share This Page