centos6.8 修改php-fpm的监听端口

版权声明: https://blog.csdn.net/yangshuolll/article/details/84943048

主要是修改php-fpm的监听端口,然后修改nginx的配置,对应php-fpm的监听端口。

  1. 修改 /etc/php-fpm.d/www.conf 文件,将监听的 listen = 127.0.0.1:9000 改成 listen = 127.0.0.1:8999
  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;
 }
  1. 重启nginx即可 (执行 service nginx restart )

猜你喜欢

转载自blog.csdn.net/yangshuolll/article/details/84943048