今天同事遇到一個問題,我之前也遇到過。。
在nginx 配置中,很多站喜歡加上$_SERVER 自定義變量 proxy_set_header SITE_NAME 'abc.com'
在PHP 中 $_SERVER始終讀取不到http_site_name。
有的配置缺可以。。
各種搜索引擎未果,underscores_in_headers on 設置無效。
在個別版本中
proxy_set_header SITE_NAME 'abc.com'
無效。
改寫成
proxy_set_header SITE-NAME 'abc.com'
就可以了。