这是网上的教程,设置了还是没效果
location = /favicon.ico {
log_not_found off;
access_log off;
}
nginx还是会报错
2018/04/03 00:00:13 [error] 71#71: *16 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Yaf_Exception_LoadFailed_Controller: Failed opening controller script /app/src/Application/controllers/Favicon.ico.php: No such file or directory in /app/src/public/index.php:6
Stack trace:
#0 /app/src/public/index.php(6): Yaf_Application->run()
#1 {main}
thrown in /app/src/public/index.php on line 6" while reading response header from upstream, client: 172.20.0.1, server: 127.0.0.1, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:12000", referrer: "http://127.0.0.1:12000/"
2 回答
BIG阳
TA贡献1859条经验 获得超6个赞
报错报的是/app/src/Application/controllers/Favicon.ico.php
,是Favicon.ico.php,你针对favicon.ico的规则应该没有生效,所以建议你先看看php重定向那里有没有问题
慕的地8271018
TA贡献1796条经验 获得超4个赞
location = /favicon.ico {
return 404;
expires 30d;
log_not_found off;
access_log off;
}
- 2 回答
- 0 关注
- 570 浏览
添加回答
举报
0/150
提交
取消