Nginx和favicon.ico -“获取/favicon.ico HTTP/1.1”失败

t5fffqht  于 2022-12-03  发布在  Nginx
关注(0)|答案(2)|浏览(641)

如何我摆脱所有以下错误在nginx.我没有一个favicon.ico

2012/03/11 17:13:25 [error] 959#0: *116 open() "/usr/local/nginx/html/favicon.ico" failed (2: No such file or directory), client: 111.68.59.75, server: 127.0.0.1, request: "GET /favicon.ico HTTP/1.1"

我会想象nginx conf中的一些行?

e5njpo68

e5njpo681#

location = /favicon.ico {
  log_not_found off;
}
lkaoscv7

lkaoscv72#

对我来说最好的解决办法是:

location = /favicon.ico {
  return 204;
  access_log     off;
  log_not_found  off;
}

相关问题