实战案例:CentOS 7 利用清华yum源实现PHP-FPM的UDS模式

实战案例:CentOS 7 利用清华yum源实现PHP-FPM的UDS模式
[root@centos7 ~]#yum install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
[root@centos7 ~]#yum install httpd php73-php-fpm  -y
[root@centos7 ~]#vim /etc/opt/remi/php73/php-fpm.d/www.conf
listen = /var/run/php.sock
listen.owner = apache
listen.group = apache
listen.mode = 0660
pm.status_path = /fpm_status 
ping.path = /ping

[root@centos7 ~]#vim /etc/httpd/conf.d/fcgi.conf
DirectoryIndex index.php
ProxyRequests Off
#ProxyPassMatch ^/(.*/.php)fcgi://10.0.0.17:9000/data/html/1
ProxyPassMatch ^/(.*/.php)unix:/var/run/php.sock|fcgi://localhost/data/html/1
ProxyPassMatch ^/(fpm_status|ping) unix:/var/run/php.sock|fcgi://localhost  

[root@centos7 ~]#systemctl restart httpd php73-php-fpm.service
[root@centos7 ~]#curl http://127.0.0.1/ping
pong[root@centos7 ~]#curl http://127.0.0.1/fpm_status
pool:                 www
process manager:      dynamic
start time:           11/Mar/2020:11:43:56 +0800
start since:          488
accepted conn:        8
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

本文链接:http://www.yunweipai.com/36103.html

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/52447.html

(0)
上一篇 2021年8月6日
下一篇 2021年8月6日

相关推荐

发表回复

登录后才能评论