Nginx匹配IP
来源:互联网 发布:静态个人引导页源码 编辑:程序博客网 时间:2024/05/21 10:55
Nginx 匹配ip
首先,大家如果看到有什么不懂的地方,欢迎吐槽!!!
我会在当天或者第二天及时回复,并且改进~~
定义反向代理
upstream portal.hongxue.com {server 192.168.0.216:100 weight=1;}upstream mobile.hongxue.com {server 192.168.0.216:200 weight=1;}upstream console.hongxue.com {server 192.168.0.216:300 weight=1;}
定义Server{}配置
server {listen 80;server_name www.hongxue.com;charset utf8;location / {if ( $remote_addr = "10.1.2.6" ) { proxy_pass http://console.hongxue.com; break; }if ( $remote_addr = "10.1.2.5" ) { proxy_pass http://portal.hongxue.com; break; }if ( $remote_addr = "10.1.2.7" ) { proxy_pass http://mobile.hongxue.com; break;} proxy_pass http://192.168.0.223/;}}
0 0
- Nginx匹配IP
- nginx精准匹配, 一般匹配, 正则匹配
- nginx location 匹配顺序
- nginx location匹配规则
- Nginx location 匹配规则
- nginx location匹配规则
- nginx location匹配规则
- nginx location匹配规则
- NGINX location 匹配规则
- nginx的location匹配
- nginx 匹配配置文件启动
- nginx 正则表达式 匹配
- nginx location匹配规则
- nginx location匹配规则
- nginx location匹配规则
- nginx location匹配优先级
- nginx location匹配规则
- nginx location 匹配顺序
- 关于12306网络订票的思考
- Worm(2151)
- jquery的$.extend和$.fn.extend作用及区别
- elasticsearch 1:入门
- Linux下C连接MySQL数据库方法
- Nginx匹配IP
- 写文档总结
- Linux 下 profile 技巧
- 关于Android文字转语音(TTS)开发
- MySQL加密和解密
- IOS应用程序多语言本地化解决方案
- 开源社区第19期JAVA架构培训班开始报名啦!每期只招十个,报名抓紧时间啦!
- PT协程简介
- Android记录23-关于actionbar中overflow menu(溢出菜单)中的一些问题