시스템에 PHP5-FPM을 모니터링 : LEMP는 내가 문제가있는 경우 Nginx에 나 PHP-FPM를 다시 시작하는 도구 MONIT를 구성하기 위해 노력하고있어구성 MONIT 우분투/Nginx에 설치
우분투 14.04에서 실행. Monit은 Nginx를 올바르게 모니터링하지만 모니터하지 않을 것이라고 말합니다. 분명히 내가 틀린 위치를 확인하는 중이 야. 내가 갔다
## Check Nginx
check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
## Check PHP-FPM
check process php-fpm with pidfile /var/run/php-fpm/php-fpm.pid
group www-data #change accordingly
start program = "/etc/init.d/php5-fpm start"
stop program = "/etc/init.d/php5-fpm stop"
if failed unixsocket /var/run/php-fpm/php-fpm.sock then restart
if 3 restarts within 5 cycles then timeout
: 여기
location ~ \.php$ { ## Execute PHP scripts
if (!-e $request_filename) { rewrite//index.php last; } ## Catch 404s that try_files miss
expires off; ## Do not cache dynamic content
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; ## See /etc/nginx/fastcgi_params
fastcgi_keep_conn on; #hhvm param
}
는 Nginx에와 PHP-FPM 모두 내 MONIT 구성입니다 : 여기
소켓에서 실행되는 PHP-FPM 내 Nginx의 구성입니다 제안 된 시작 및 중지 권장 사항은 항상 "service php5-fpm restart"로 다시 시작되지만.
내 그룹 - /etc/php5/fpm/pool.d/www.conf에 따르면 "group = www-data"입니다. 어떤 제안?
이 문제의 일부를 발견했습니다. 내 PID 파일이 실제로 /var/run/php5-fpm.pid에 위치하도록 (기본적으로 Ubuntu의 경우) 구성되었습니다. 이제는 "초기화 중" – sparecycle