在安装完成ngixn之后,访问页面显示空白,报错信息里面有这一条报错信息:
tailf /usr/local/nginx/logs/error.log
2018/10/26 10:58:00 [error] 25483#0: *89 open() "/usr/local/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.10.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.10.133"
之后查找资料,觉得下面的还可行
把以下配置放到 server {} 块.
关闭favicon.ico不存在的记录日志
vim /usr/local/nginx/conf/nginx.conf
location /favicon.ico {
log_not_found off;
access_log off;
}
之后重启服务
nginx -t
nginx -s reload
就没有上面的报错信息了,希望能够帮助到各位!