


http {
## PHP-FPM Servers ##
upstream php-fpm {
server 127.0.0.1:9000;
}
server {
location ~ \.php$ {
# fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
http {
## PHP-FPM Servers ##
upstream php-fpm {
server 127.0.0.1:9000;
}
upstream php_farm {
server 127.0.0.1:9003 weight=1;
server 127.0.0.1:9004 weight=1;
server 127.0.0.1:9005 weight=1;
server 127.0.0.1:9006 weight=1;
}
server {
location ~ \.php$ {
# fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# fastcgi_pass 127.0.0.1:9000;
fastcgi_pass php_farm;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
}



我是拥有 15+ 年经验的 PHP / Go 后端工程师。如需以下服务,欢迎联系我(更多介绍请查看 关于我 & 合作):
- ✅ PHP / Go 项目开发与维护
- ✅ 系统架构设计与技术咨询
- ✅ 网站性能优化与故障排查
- ✅ Linux 服务器部署与运维
- ✅ 网络环境优化与远程支持
- ✅ 长期技术顾问合作
微信:13980074657
邮箱:shuijingwanwq@gmail.com
Telegram:@shuijingwan
GitHub:https://github.com/shuijingwan

发表回复