
在/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
以上就是nginx首页中文乱码怎么解决的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号