Results 1 to 16 of 16

Thread: FPM status page not working

  1. #1
    Join Date
    Nov 2013
    Posts
    89

    FPM status page not working

    I am trying to get the status page working in php-fpm55 with apache2. I have uncommented the pm.status variable and set it to /status. Furthermore, I have added the following to my virtual hosts config in Custom HTTPD configuration:

    <FilesMatch "^ping|status$">
    SetHandler php-script
    </FilesMatch>

    After that, I restarted httpd and php-fpm55. Trying to access the status page, gives me a 404 error.

    Am I missing something?

  2. #2
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    6,971
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  3. #3
    Join Date
    Nov 2013
    Posts
    89
    Thanks, Martynas. But that one is for Nginx. What would be the syntax for Apache?

  4. #4
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    6,971
    Code:
    <FilesMatch "^ping|status$">
    SetHandler "proxy:unix:/usr/local/php56/sockets/webapps.sock|fcgi://localhost"
    </FilesMatch>
    Just change the text in bold to fit your own needs
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  5. #5
    Join Date
    Nov 2013
    Posts
    89
    Thanks again, Martynas. Still, it is not working for me. Steps I carried out:

    Chose Custom HTTPD Confuigurations.
    Chose the domain I would like to stat, referees.eu.
    Inserted the following (I am using php55):
    <FilesMatch "^ping|status$">
    SetHandler "proxy:unix:/usr/local/php55/sockets/covst.sock|fcgi://localhost"
    </FilesMatch>
    Verified that the httpd.conf consists of the SetHandler; the AddHandler is added automatically.
    Restarted httpd and php-fpm55.
    Browsed to http://referees.eu/status
    Got a 404.

    I also verified that status.html is available:
    In /usr/local/php55
    ./php/php/fpm/status.html
    ./php/fpm/status.html

    I am sorry if I am missing something obvious.

  6. #6
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    6,971
    Where did you enable the status page in FPM? You should have done that in per-user custom PHP-FPM configuration (reachable on DA admin level, "Custom HTTPD Configurations" URL).
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  7. #7
    Join Date
    Nov 2013
    Posts
    89
    Originally, I added it to the global php-fpm.conf in /usr/local/php55/etc. Per your advice I added it to the custom 1 section of the corresponding domain. No luck. Tried to enter it in custom 2, but no luck with that either.

  8. #8
    Join Date
    Nov 2013
    Posts
    89
    Any other suggestions?

  9. #9
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    6,971
    Please PM me with the details, I'll check what's configured incorrectly there.
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  10. #10
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    6,971
    The problem was caused by a .htaccess file in public_html folder, so that's why /stats and /ping did not work there. Disabling RewriteEngine for /stats and /ping did the trick:
    Code:
    <FilesMatch "^ping|status$">
       RewriteEngine Off
       SetHandler "proxy:unix:/usr/local/php55/sockets/covst.sock|fcgi://localhost"
    </FilesMatch>
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  11. #11
    Join Date
    Nov 2013
    Posts
    89

    Thumbs up

    Thank you very much!

  12. #12
    Join Date
    Apr 2009
    Posts
    2,096
    Quote Originally Posted by smtalk View Post
    Code:
    <FilesMatch "^ping|status$">
    SetHandler "proxy:unix:/usr/local/php56/sockets/webapps.sock|fcgi://localhost"
    </FilesMatch>
    Just change the text in bold to fit your own needs
    Is this still correct way to enable status page in PHP-FPM when not running nginx?

    What I am trying to figure out, is how to enable the PHP-FPM status page to be viewable only on server hostname, and not on users own domains?

    Then I can't do in in "Custom HTTPD Configurations", because server hostname is not listed there.

  13. #13
    Join Date
    Apr 2009
    Posts
    2,096
    I almost figured it out. I managed to get it working for a selected user, but what I wanted was to get it working on server.hostname.com/fpmstatus, please share it if you know how to.

    Here is how I got it working on a user:

    On admin level "Custom HTTPD Configurations" click the "php-pfm" link and add this to :CUSTOM2
    Code:
    pm.status_path = /fpmstatus
    Then on admin level "Custom HTTPD Configurations" click on a domain for a user that you want to view status page for. Then add this in "Httpd.conf Customization for yourdomain.com" (replace "USER" with the actual username and replace 111.111.111.111 with your computer ip address):
    Code:
    <LocationMatch "/fpmstatus">
    Require ip 111.111.111.111
    SetHandler "proxy:unix:/usr/local/php70/sockets/USER.sock|fcgi://localhost"
    </LocationMatch>
    Please share if you know how to do this for server hostname and to get a status page with status for all users/domains on the server. I don't know how because server hostname is not available in "Custom HTTPD Configurations".
    Last edited by ditto; 07-18-2017 at 11:28 AM.

  14. #14
    Join Date
    Apr 2009
    Posts
    2,096
    But the php-fpm status page do not show any urls like apache status page does. Is it possible to change settings to get urls on php pages to show up on php-fpm status page? If not that is a big drawback for me when changing from mod_php to php-fpm.

    Edit: I am confused. It seems that I still see the urls to php page request on the apache status page. I believed that php-fpm would handle all php request and apache only handle static files? Anyway, I don't need to see the urls in php-fpm status page as long as I can see the urls also on request to php pages in apache status page. So that is solved, but makes me confused, again.
    Last edited by ditto; 07-18-2017 at 12:04 PM.

  15. #15
    Join Date
    Jun 2017
    Location
    ZS
    Posts
    50
    I have problem with config for php-fpm70 status page (apache 2.4)
    add into fpm70 for this subdomain
    in |Custom2| section -> pm.status_path = /status
    in httpd conf for subdomain
    <FilesMatch "^ping|status$">
    RewriteEngine Off
    SetHandler "proxy:unix:/usr/local/php70/sockets/szukamprac.sock|fcgi://localhost"
    </FilesMatch>
    Rewrite confs and when go to blog.szukampracy.pl/status have File not found.

    add this
    <FilesMatch "^ping|status$">
    SetHandler "proxy:unix:/usr/local/php70/sockets/szukamprac.sock|fcgi://localhost"
    </FilesMatch>
    and have 404 error

    another problem with apache status page ;/
    I have add into /etc/httpd/conf/extra/httpd-info.conf
    <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    </Location>
    and remove # before ExtendedStatus On

    reset httpd and go to mydomain/server-status
    Forbidden
    You don't have permission to access /server-status on this server.
    Last edited by Mattpl; 02-05-2018 at 11:39 PM.
    Working with Deb 8/DA/CB2/MariaDB10.0/PHP7 | https://szukampracy.pl & https://ksservice.pl & https://pramed.pl

  16. #16
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,594
    I actually got this working but
    Code:
    Require ip <my ip>
    fails (403), removing it is fine.... Even tried enclosing it in <RequireAny> tags, no dice

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •