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

$host 和 $http_host 的差别

  •  
  •   Livid ·
    PRO
    · Sep 30, 2013 · 9274 views
    This topic created in 4813 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   ·   903 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 21:41 · PVG 05:41 · LAX 13:41 · JFK 16:41
    ♥ Do have faith in what you're doing.