我的nginx自动索引页没有正确显示UTF-8字符,utf-8问题。
我已经在nginx.conf
文件的服务器块配置部分设置了D2
,但这似乎没有解决问题。
发布于 2020-04-03 10:36:27
将charset UTF-8;
添加到http、服务器或位置。
下面是我的/etc/nginx/conf.d/default.conf
的相关部分,现在自动索引显示了UTF字符。
server {
listen 80;
charset UTF-8;
location / {
root /usr/share/nginx/html;
location /some/path {
autoindex on;
}
}
}
我在https://www.cyberciti.biz/faq/nginx-set-http-content-type-response-header-to-charset-utf8/找到了这个。
https://serverfault.com/questions/966901
复制相似问题