nginx 负载均衡
1、nginx配置如下:在入口服务器192.168.1.1设置upstream myfastcgi { server 192.168.1.2:9000 weight=1; ser即枢潋雳ver 192.168.1.3:9000 weight=1; }server{ listen 80; server_name localhost; root /home/html; location ~\.php{ include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass myfastcgi; }}
2、将服务器192.168.1.2192.168.1.3的php-fpm配置文件/etc/php5/fpm/pool.d/www.conf 中的listen改为192.168.1.2:9000 和192.168.1.3:9000
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:83
阅读量:60
阅读量:30
阅读量:22
阅读量:79