Skip to main content

EasyApache 4 PHP-FPM Status Page

Comments

7 comments

  • cPanelMichael
    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!
    0
  • dhultin
    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 SetHandler proxy:unix:/opt/cpanel/ea-php56/root/usr/var/run/php-fpm/c71e80857422fac3e2c4db73c2eb615bedb15678.sock|fcgi://disc4life.com/ 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/ 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.
    0
  • Hosted Power
    Any update on this? We would like to have a supported method as well!
    0
  • cPanelMichael
    Any update on this? We would like to have a supported method as well!

    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!
    0
  • Alesak
    There is pretty easy way to achieve this without much configuration:
      ]
    • 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
    • than rebuild FPM configuration files with /scripts/php_fpm_config --rebuild
    • than create file status.phtml in each website root with simple content like ,file must exist so the request is forwarded to FPM
    • to finish just restart PHP-FPM daemons
    Now you will be able to see status page like
    0
  • speckados
    Hi. I've tried this on my machines and not work. I think I made a mistake in the process. vi /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml
    --- php_admin_flag_allow_url_fopen: 'on' php_admin_flag_log_errors: 'on' php_admin_value_disable_functions: "\"\"" php_admin_value_doc_root: "\"[% documentroot %]/\"" php_admin_value_error_log: "[% homedir %]/logs/[% scrubbed_domain %].php.error.log" php_admin_value_short_open_tag: 'on' php_value_error_reporting: E_ALL & ~E_NOTICE pm_max_children: 5 pm_max_requests: 20 pm_process_idle_timeout: 10 pm_status_path = "/status.phtml" ping_path = "/ping"
    /scripts/php_fpm_config --rebuild
    .... info [php_fpm_config] rebuild_files: working on domain (arch.domain.com) info [php_fpm_config] rebuild_files: working on domain (test.domain.com) info [php_fpm_config] php-fpm: rebuild_files: restart fpm services for Apache info [php_fpm_config] php-fpm: fpm services restarted info [php_fpm_config] Rebuilding vhosts in apache conf info [php_fpm_config] Rebuild Complete
    Check changes fails cat /opt/cpanel/ea-php72/root/etc/php-fpm.d/domain.com.conf
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; cPanel FPM Configuration ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NOTICE This file is generated. Please use our WHM User Interface ; to set these values. [domain_com] catch_workers_output = yes chdir = /home/domain group = "domain" listen = /opt/cpanel/ea-php72/root/usr/var/run/php-fpm/e519794b34f5a594b0441b0b59a73fd7cca77e21.sock listen.group = "nobody" listen.mode = 0660 listen.owner = "domain" php_admin_flag[allow_url_fopen] = on php_admin_flag[log_errors] = on php_admin_value[doc_root] = "/home/domain/public_html/" php_admin_value[error_log] = /home/domain/logs/domain_com.php.error.log php_admin_value[short_open_tag] = on php_value[disable_functions] = "" php_value[error_reporting] = E_ALL & ~E_NOTICE ping.path = /ping pm = ondemand pm.max_children = 100 pm.max_requests = 750 pm.max_spare_servers = 5 pm.min_spare_servers = 1 pm.process_idle_timeout = 150 pm.start_servers = 0 pm.status_path = /status security.limit_extensions = .phtml .php .php3 .php4 .php5 .php6 .php7 .php8 user = "domain"
    pm.status_path show /path instead /status.pthml After restart php-fpm, get 404 for Also if create a status.phtml
    0
  • cPRex Jurassic Moderator
    @speckados - it's important to note the details provided so far aren't official workarounds provided by cPanel, so I can't say for sure if they work across version changes and updates to our software. It might be best to open a ticket with our Technical Support team to see if there are other options available to get this configured.
    0

Please sign in to leave a comment.