已解答
发布

centos使用tengine的相应头Content-Language:en_US,怎么修改服务器编码,返回头都是这个。
服务器编码:

[root@cloud conf]# locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8

但是使用curl查询还是一下数据:

C:\Users\koal>curl -I www.****.****
HTTP/1.1 200 OK
Server: tengine
Date: Tue, 15 Nov 2016 20:29:36 GMT
Content-Type: text/html;charset=UTF-8
Content-Length: 37452
Connection: keep-alive
Vary: Accept-Encoding
Content-Language: en-US

1 答案

发布
管理员 2016-11-16

可以尝试加一个https://github.com/openresty/headers-more-nginx-module 模块

#1

请登录或者 注册 来提交答案