您的位置:首页 > 运维架构 > Nginx

nginx几个全局变量

2015-05-04 17:55 232 查看
在两台虚拟机中测试,一台nginx做LB,一台nginx做web
客户端hosts映射如下:
192.168.56.103 www.test.com
192.168.56.101 www.ori.com
其中
192.168.56.103 为LB
192.168.56.101 为WEB
访问下面链接
http://www.test.com/echo
结果如下:
http_x_forwarded_for: 192.168.56.1http_via:http_host: testhost: testremote_addr: 192.168.56.103document_uri: /echodocument_root: /usr/local/nginx//htmlhostname: test1http_cookie:http_referer:request_filename: /usr/local/nginx//html/echorequest: GET /echo HTTP/1.0request_uri: /echoserver_addr: 192.168.56.101server_name: localhosturi: /echo
访问下面链接http://www.ori.com/echosdfsfssdfsagd?jsdfk结果如下:
http_x_forwarded_for:http_via:http_host: www.ori.comhost: www.ori.comremote_addr: 192.168.56.1document_uri: /echosdfsfssdfsagddocument_root: /usr/local/nginx//htmlhostname: test1http_cookie:http_referer:request_filename: /usr/local/nginx//html/echosdfsfssdfsagdrequest: GET /echosdfsfssdfsagd?jsdfk HTTP/1.1request_uri: /echosdfsfssdfsagd?jsdfkserver_addr: 192.168.56.101server_name: localhosturi: /echosdfsfssdfsagd
本文出自 “寒桥病树的博客” 博客,请务必保留此出处http://liushan2046.blog.51cto.com/5275814/1641818
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: