Nginx 错误汇总

转自链接:https://blog.csdn.net/cjfeii/article/details/49511829
1. Upstream timed out (110: Connection timed out) while reading response header from upstream
这种情况主要在下面两种情况下发生:

a. Nginx 作为 proxy,需要适当的调整 proxy timeout 的值。
location / {
...
proxy_connect_timeout 300;
proxy_read_timeout 300;
proxy_send_timeout 300;
...
}

b. Nginx作为 php-fpm 等其他的有上游服务,需要适当的调整 fastcgi_read_timeout 选项值
location ~* .php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_read_timeout 150;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

2. open() “/usr/local/nginx/html/favicon.ico” failed (2: No such file or directory)
只需要关闭 favicon.ico 的 log:

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


ref:
http://www.ttlsa.com/nginx/nginx-upstream-timed-out-110-connection-timed-out/
http://stackoverflow.com/questions/9657065/nginx-and-favicon-ico-get-favicon-ico-http-1-1-failed
————————————————
版权声明:本文为CSDN博主「cjfeii」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/cjfeii/article/details/49511829

你可能感兴趣的:(Nginx 错误汇总)