Skip to content

Commit

Permalink
Added PHP status and ping pages processing
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Aug 15, 2022
1 parent c44352e commit d7d3a4f
Show file tree
Hide file tree
Showing 55 changed files with 294 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Listen 8443
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
7 changes: 7 additions & 0 deletions Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Listen 8443
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Listen 8443
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
7 changes: 7 additions & 0 deletions Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Listen 8443
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"

<LocationMatch "/(ping|status)">
Order Allow,Deny
Allow from all

SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</LocationMatch>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/web-nginx-mysql/ol/conf/etc/php-fpm.d/zabbix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
9 changes: 9 additions & 0 deletions Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ server {
return 404;
}

location ~ ^/(status|ping)$ {
access_log off;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ php_value[upload_max_filesize] = ${ZBX_UPLOADMAXFILESIZE}
php_value[max_input_time] = ${ZBX_MAXINPUTTIME}
php_value[max_input_vars] = 10000
php_value[date.timezone] = ${PHP_TZ}

; PHP-FPM monitoring
pm.status_path = /status
ping.path = /ping
Loading

0 comments on commit d7d3a4f

Please sign in to comment.