Home > Backend Development > PHP Problem > How to modify php fpm listening port

How to modify php fpm listening port

藏色散人
Release: 2023-03-03 11:12:01
Original
8506 people have browsed it

How to modify the php fpm port: first open the "www.conf" file; then modify the content to "listen = 127.0.0.1:8999"; finally modify the content in "default.conf" to "fastcgi_pass 127.0" .0.1:8999" is enough.

How to modify php fpm listening port

Recommended: "PHP Tutorial"

centos6.8 Modify the listening port of php-fpm

Mainly modify the listening port of php-fpm, and then modify the configuration of nginx to correspond to the listening port of php-fpm.

1. Modify the /etc/php-fpm.d/www.conf file and change the listening value from listen = 127.0.0.1:9000 to listen = 127.0.0.1:8999

2. service php-fpm restart

3. Modify /etc/nginx/conf.d/default.conf and change fastcgi_pass 127.0.0.1:9000 to 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;
 }
Copy after login

4 .Restart nginx (execute service nginx restart)

The above is the detailed content of How to modify php fpm listening port. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template