Last active
December 4, 2021 14:04
-
-
Save FerraBraiZ/ca4eeb2a58b69cdcfe1194f1cc436100 to your computer and use it in GitHub Desktop.
nginx & php-fpm status page # https://easyengine.io/tutorials/php/fpm-status-page/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ cat /etc/nginx/conf.d/default.conf | |
server { | |
listen 80; | |
listen [::]:80; | |
# listen 443 ssl default_server; | |
# listen [::]:443 ssl default_server; | |
server_name _; | |
root /var/www; | |
index /index.php; | |
charset utf-8; | |
client_max_body_size 500M; | |
fastcgi_read_timeout 18000; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log debug; | |
location ~ /\.ht { | |
deny all; | |
} | |
location /diagnostics/status/nginx { | |
stub_status; | |
allow 127.0.0.1; #only allow requests from localhost | |
deny all; #deny all other hosts | |
} | |
location /diagnostics/status/php-fpm { | |
allow 127.0.0.1; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_pass 127.0.0.1:6969; | |
} | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 404. | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass 127.0.0.1:6969; | |
fastcgi_index /index.php; | |
include fastcgi_params; | |
fastcgi_param PHP_VALUE "error_log=/var/log/php/errors.log"; | |
fastcgi_buffer_size 32k; | |
fastcgi_buffers 16 16k; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment