nginx 反向代理 负载均衡
2016-05-12 16:06
691 查看
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/epel-release-6-5.noarch.rpmrpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/ius-release-1.0-10.ius.el6.noarch.rpmrpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm yum install nginx service nginx start vi /etc/nginx/nginx.confuser nginx;worker_processes 1;error_log /var/log/nginx/error.log warn;pid /var/run/nginx.pid;events {worker_connections 1024;}http {include /etc/nginx/mime.types;default_type application/octet-stream; log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘‘$status $body_bytes_sent “$http_referer” ‘‘”$http_user_agent” “$http_x_forwarded_for”‘;access_log /var/log/nginx/access.log main;sendfile on;#tcp_nopush on;keepalive_timeout 65;#gzip on;# include /etc/nginx/conf.d/*.conf;upstream site {#ip_hash;server 192.168.1.4:80 weight=5;server 192.168.1.5:80 weight=10;}server{listen 80;server_name site;location / {root html;index index.html;proxy_pass http://site;}}}
相关参阅:http://www.antcaves.com/index.php/2016/05/05/nginx/
相关参阅:http://www.antcaves.com/index.php/2016/05/05/nginx/
相关文章推荐
- Android IPC进程间通讯机制
- android之定时器AlarmManager
- axis备忘
- Windows XP Service Pack 3 RC1 v.3244 winxp补丁3 提供下载
- Run As Service runassrv.exe 详细参数第1/2页
- 安装MySQL在最后的start service停住了解决方法
- android使用Messenger绑定Service的多种实现方法
- 批处理命令Start的使用介绍
- asp.net Web Service 接口大量数据传输解决方案
- UI Events 用户界面事件
- Silverlight中动态获取Web Service地址
- PHP中header和session_start前不能有输出原因分析
- android调用web service(cxf)实例应用详解
- 在Android中 获取正在运行的Service 实例
- ASP.NET State service状态服务的问题解决方法
- java thread start()和run()方法简析
- 卸载ZkeysPHP 后iis网站出现Service Unavailable 解决办法
- IIS Admin Service 服务因 2149647636 (0x80210514) 服务性错误而停止
- Service Temporarily Unavailable的503错误是怎么回事?
- Redis(三)高级应用