修改php fpm端口的方法:首先打开“www.conf”文件;然后修改内容为“listen = 127.0.0.1:8999”;最后修改“default.conf”中的内容为“fastcgi_pass 127.0.0.1:8999”即可。

推荐:《PHP教程》
centos6.8 修改php-fpm的监听端口
主要是修改php-fpm的监听端口,然后修改nginx的配置,对应php-fpm的监听端口。
1.修改 /etc/php-fpm.d/www.conf 文件,将监听的 listen = 127.0.0.1:9000 改成 listen = 127.0.0.1:8999
立即学习“PHP免费学习笔记(深入)”;
2.service php-fpm restart
3.修改 /etc/nginx/conf.d/default.conf 将其中 fastcgi_pass 127.0.0.1:9000 改成 fastcgi_pass 127.0.0.1:8999
location ~ .php$ {
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}4.重启nginx即可 (执行 service nginx restart )
以上就是如何修改php fpm监听端口的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号