首页 > 其他 > 详细

NGINX 配置的一个坑,proxy_set_header 中携带下划线

时间:2015-04-22 02:09:58      阅读:1672      评论:0      收藏:0      [点我收藏+]

今天同事遇到一个问题,我之前也遇到过。。

在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‘

就可以了。

本文出自 “陈南润” 博客,请务必保留此出处http://chennanrun.blog.51cto.com/4583928/1636667

NGINX 配置的一个坑,proxy_set_header 中携带下划线

原文:http://chennanrun.blog.51cto.com/4583928/1636667

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!