V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
Livid
V2EX  ›  NGINX

$host 和 $http_host 的差别

  •  
  •   Livid · 2013-09-30 19:25:26 +08:00 · 8380 次点击
    这是一个创建于 3860 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    1970-01-01 08:00:00 +08:00
    ijse
        1
    ijse  
       2013-09-30 20:08:07 +08:00   ❤️ 2
    配置nginx的proxy_pass时,设置HOST头要用$http_host, 除非端口号是80

    在这坑里栽过。。
    julyclyde
        2
    julyclyde  
       2013-10-06 14:41:01 +08:00   ❤️ 1
    $http_host是request里的host header
    $host是server{}里的server_name里的第一个
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3427 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:34 · PVG 19:34 · LAX 04:34 · JFK 07:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.