In /etc/php/7.1/fpm/pool.d/www.conf
habe ich pm.status_path = /status
festgelegt. Und in Nginx habe ich die folgende Konfiguration vor Ort /etc/nginx/sites-enabled/datadog
Nginx-Site für PHP-FPM-Statusseite gibt "Datei nicht gefunden" zurück
server {
listen 80;
server_name localhost;
location ~ ^/(status|ping)$ {
access_log off;
allow 127.0.0.1;
deny all;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
}
}
ich getestet habe, dass die Statusseite korrekt Setup mit
SCRIPT_NAME=/status \
SCRIPT_FILENAME=/status \
REQUEST_METHOD=GET \
cgi-fcgi -bind -connect /run/php/php7.1-fpm.sock
Welche
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Content-type: text/plain;charset=UTF-8
pool: www
process manager: dynamic
start time: 13/Nov/2017:22:05:44 +0000
start since: 5030
accepted conn: 1789
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 2
active processes: 1
total processes: 3
max active processes: 4
max children reached: 0
slow requests: 0
jedoch zurückkehrt, wenn ich versuche, Zugriff auf die Nginx-Website mit curl http://localhost/status
Ich bekomme den folgenden Fehler.
2017/11/13 23:32:57 [error] 885#885: *35 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /status HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "localhost"
Was ist der Wert von: '$ fastcgi_script_name'? Es sieht so aus, als ob das nicht eingestellt ist ... –
Wie kann ich das testen? – Esben