Skip to content

Commit

Permalink
Enabled PHP FPM status page on /php-fpm-status
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jun 27, 2022
1 parent 48e37c5 commit 7e02a42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 3.9.0 (not released yet)

* Increase the number of FPM worker from 4 to 25
* Enabled PHP FPM status page on `/php-fpm-status`

## 3.8.0 (2022-06-15)

* Add documentation cookbook for using pg_activity
Expand Down
11 changes: 11 additions & 0 deletions infrastructure/docker/services/frontend/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ http {
add_header Cache-Control "no-cache";
}

# Remove this block if you want to access to PHP FPM monitoring
# dashboarsh (on URL: /php-fpm-status). WARNING: on production, you must
# secure this page (by user IP address, with a password, for example)
location ~ ^/php-fpm-status$ {
deny all;
}

location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
Expand All @@ -49,6 +56,10 @@ http {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param SERVER_NAME $http_host;
# # Uncomment if you want to use /php-fpm-status endpoint **with**
# # real request URI. It may have some side effects, that's why it's
# # commented by default
# fastcgi_param SCRIPT_NAME $request_uri;
}

error_log /proc/self/fd/2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 3
pm.max_requests = 500
pm.status_path = /php-fpm-status
clear_env = no
request_terminate_timeout = 120s
catch_workers_output = yes

0 comments on commit 7e02a42

Please sign in to comment.