nginx反向代理和负载均衡service iptables stopchkconfig iptables offsetenforce 0yum -y install httpdweb1.test.comecho “web2.test.comcd /var/www/html/vim index.htmlsystemctl start httpd.servicenetstat -anpt | grep :80cd /usr/local/nginx/conf/cp nginx.conf nginx.
目录:1.实验环境2.安装并配置nginx3.Nginx的反向代理4.Nginx的负载均衡5.这里是一台nginx代理服务器,两台web服务器。Nginx反向代理服务器:192.168.1.100Web1:192.168.1.51Web2:192.168.1.89一:环境准备1)Centos 6.5 x86_642)Nginx 1.4.73)各个节点时间同步(每个节点上和代理服务器上都要执行)4)关闭防火墙和Selinux(每个节点和nginx代理服务器上都要操作执行)servi