惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
量子位
博客园 - 司徒正美
IT之家
IT之家
V
Visual Studio Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
Google DeepMind News
Google DeepMind News
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
Vercel News
Vercel News
B
Blog
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
小众软件
小众软件
罗磊的独立博客
博客园 - 叶小钗
雷峰网
雷峰网
Martin Fowler
Martin Fowler
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学

博客园 - taodesign

一个自定义分享按钮 sublime text 3 添加 javascript 代码片段 ( snippet ) transition动画最简使用方式 hammerjs jquery的选项使用方法,以给swipe设置threshold和velocity为例 sublime text 3 的emmet 添加自定义 html 片段 解决 placeholder 垂直不居中,偏上的问题 Sublime Text 3 配置 sass javascript 进制转换(2进制、8进制、10进制、16进制之间的转换) 解决phpwind 9 转换到 discuz x 3.1的头像仍然不显示问题 sina微博登录框和twitter的比较 PHP初学者必看 不用qq的这一个月 虽然qq的第二封信些的相当中肯,但是—— 从现在起,试着不用qq一个月,看看什么情况 百度兵陷日本,Google 90% Baidu 1% wordpress 侧栏微博插件 Miniposts blogger导入到blogbus非常顺利 ie8 的断字/断行 bug dede vs 帝国
解决windows下nginx中文文件名乱码
taodesign · 2017-02-17 · via 博客园 - taodesign

我的根目录文件夹放在d盘work文件夹下,一般这样配置 nginx\conf\nginx.conf 

location / {
        root   D:/work;
        index  index_bak.html;
        autoindex on;
        autoindex_exact_size off;
        autoindex_localtime on;
        charset utf-8;
        try_files $uri $uri/ /index.php?$query_string;
}

只要把其中 charset utf-8; 改为 charset gbk,utf-8; 再访问文件夹目录就可以正确显示中文了,但是——最怕但是了,我们现在写的页面一般是utf-8编码的,访问页面,页面里的中文就成了乱码,因为nginx服务器以gbk来读文件了,所以,在windows下配置nginx显示中文文件名终究不可行

*附上php配置

location ~ \.php$ {
       #root           D:/work;
       fastcgi_pass   127.0.0.1:9000;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  D:/work$fastcgi_script_name;
       include        fastcgi_params;
}