解决nginx首页中文乱码问题「代码」
在/usr/local/nginx/conf/nginx.conf 配置文件中插入charset utf-8;或者charset 'utf-8'; server { listen 80; server_name localhost; charset utf-8; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } 或者 server { listen 80; server_name localhost; charset 'utf-8'; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; }
重新加载配置文件
/usr/local/nginx/sbin/nginx -s reload
相关推荐
nginxs 2020-11-14
Guanjs0 2020-11-13
小木兮子 2020-11-11
yserver 2020-11-11
ssihc0 2020-11-11
windle 2020-11-10
HanksWang 2020-11-10
liuchen0 2020-11-10
Freshairx 2020-11-10
ccschan 2020-11-10
liwf 2020-11-10
Guanjs0 2020-11-09
AderStep 2020-11-09
zrtlin 2020-11-09
mqfcu 2020-11-10
windle 2020-10-29