› NGINX
› NGINX Trac
› 3rd Party Modules
› Security Advisories
› CHANGES
› OpenResty
› ngx_lua
› Tengine
在线学习资源
› NGINX 开发从入门到精通
NGINX Modules
› ngx_echo
Livid
403.84D
566.55D
V2EX  ›  NGINX

$host 和 $http_host 的差别

  •  
  •   Livid ·
    PRO
    · Sep 30, 2013 · 9238 views
    This topic created in 4784 days ago, the information mentioned may be changed or developed.
    2 replies  •  1970-01-01 08:00:00 +08:00
    ijse
    ijse
    Sep 30, 2013❤️2
    1
    配置nginx的proxy_pass时,设置HOST头要用$http_host, 除非端口号是80

    在这坑里栽过。。
    julyclyde
    julyclyde
    Oct 6, 2013❤️1
    2
    $http_host是request里的host header
    $host是server{}里的server_name里的第一个
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1403 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 19:05 · PVG 03:05 · LAX 11:05 · JFK 14:05
    ♥ Do have faith in what you're doing.