nginx/php: Added support for php-fpm status page

dehydrated
Felix Stupp 4 years ago
parent 2a672cb597
commit 458babf82c
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -50,6 +50,8 @@ nginx_status_page_acl: |
allow {{ global_wireguard_ipv4_range }};
deny all;
phpfpm_status_page_path: "/.well-known/php-fpm-status"
ssh_host_key_types:
- ed25519
- rsa

@ -6,3 +6,6 @@
# pool_name from nginx/php-pool
# includes: ...
# env_vars: ...
status_page_path: "{{ phpfpm_status_page_path }}"
status_page_acl: "{{ nginx_status_page_acl }}"

@ -14,6 +14,23 @@ server {
root {{ src }};
fastcgi_hide_header X-Powered-By;
{% if status_page_path is defined and status_page_path|length -%}
location {{ status_page_path }} {
{{ status_page_acl | indent(width=4) }}
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_index index.php;
include {{ nginx_installation_directory }}/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass {{ pool_name }};
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
{%- endif %}
location ~\.php$ {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $uri =404;

Loading…
Cancel
Save