Home >Backend Development >PHP Problem >How to modify php fpm listening port
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.
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; }
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!