X

centos7+php71でphp-fpmのステータスを取得

centos7+php71でphp-fpmのステータスを取得
やったこと忘れるのでメモ

環境

# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

# php71 -v
PHP 7.1.0alpha3 (cli) (built: Jul 6 2016 10:49:24) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies

php-fpmの設定を変える
# vim /etc/php-fpm.d/www.conf
以下を修正

;pm.status_path = /status
pm.status_path = /status

webでstatus画面が見れるようにnginxのconfを修正

# vim /etc/nginx/conf.d/default.conf
location /status {
include fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
allow 許可するIP;
deny all;
}

サービスを再起動

# systemctl restart php-fpm
# systemctl restart nginx

http://どめいん/status
にアクセスしてこんな画面が出てきたら終了

pool: www
process manager: dynamic
start time: 10/Jul/2016:22:46:40 +0900
start since: 2
accepted conn: 1
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 4
active processes: 1
total processes: 5
max active processes: 1
max children reached: 0
slow requests: 0

Tags: linuxnginx
higherhope: