php-fpm 配置

启动php-fpm

systemctl start php74-php-fpm

关闭php-fpm

systemctl stop php74-php-fpm

找到配置文件位置:

ps -ef |grep php

[root@VM-0-6-centos nginx]#  ps -ef|grep php
root      3059     1  0 May02 ?        00:00:00 php-fpm: master process (/etc/opt/remi/php74/php-fpm.conf)
apache    3060  3059  0 May02 ?        00:00:11 php-fpm: pool www
apache    3061  3059  0 May02 ?        00:00:11 php-fpm: pool www
apache    3062  3059  0 May02 ?        00:00:12 php-fpm: pool www
apache    3063  3059  0 May02 ?        00:00:12 php-fpm: pool www
apache    3064  3059  0 May02 ?        00:00:12 php-fpm: pool www
apache    3115  3059  0 May02 ?        00:00:11 php-fpm: pool www
apache    4637  3059  0 May02 ?        00:00:11 php-fpm: pool www
apache    6917  3059  0 May02 ?        00:00:07 php-fpm: pool www
apache    7050  3059  0 May02 ?        00:00:08 php-fpm: pool www
apache    7051  3059  0 May02 ?        00:00:08 php-fpm: pool www
 

配置php-fpm

vi /etc/opt/remi/php74/php-fpm.d/www.conf
 

1.把listen 处改成端口,这样所有ip都可以

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
;                            a specific port;
;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
;                            a specific port;
;   'port'                 - to listen on a TCP socket to all addresses
;                            (IPv6 and IPv4-mapped) on a specific port;
;   '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 9000

2. 修改运行的ip

; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
; must be separated by a comma. If this value is left blank, connections will be
; accepted from any ip address.
; Default Value: any
listen.allowed_clients = 127.0.0.1,1.2.3.4,5.6.7.8 (改成自己ip,多个ip用逗号隔开)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值