回答
收藏
分享
举报
nginx类似后端节点connect timeout 或 no live upstream情况下access日志是否会记录该条日志
提问于2021-08-11 09:31

浏览 556

nginx类似后端节点connect timeout 或 no live upstream情况下access日志是否会记录该条日志?还是只记录到error.log里,记录的机制是否跟nginx版本有关系?

已修改于2023-03-17 02:27



写下您的回答
发表回答
全部回答(1)

按点赞数排序

按时间排序

只要是客户端发来了请求,不管是怎么处理的,最后必定会有access log,里面也会记录处理的结果,比如状态码是502。

access log和error log是两个不同的日志,两者互不影响。

其实可以做一个非常简单的测试,用proxy_pass转发到一个不存在的IP地址,然后看看日志。

赞同

0

回复举报

回答于2021-08-11 18:20



回复罗剑锋
回复
提问者
夜雨
这家伙很懒还未留下介绍~
0
文章
3
问答
1
粉丝
相关问答

低版本,编译会打印md5和sha1。我测试1.10版本,是打印md5和sha1的,1.11以上不打印了,可以查看
https://github.com/nginx/nginx/tree/master源代码代码仓库auto/summary文件,里面有描述。下面为我本地Ubuntu18.04编译指令:
在代码根目录运行,./auto/configure --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream --with-stream_ssl_module --add-module=/home/lq/work/tongmingzhiyun/openresty/lua-nginx-module-0.10.21 --add-module=/home/lq/work/tongmingzhiyun/openresty/ngx_devel_kit-0.3.1
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library

nginx path prefix: "/opt/nginx"
nginx binary file: "/opt/nginx/sbin/nginx"
nginx modules path: "/opt/nginx/modules"
nginx configuration prefix: "/opt/nginx/conf"
nginx configuration file: "/opt/nginx/conf/nginx.conf"
nginx pid file: "/opt/nginx/logs/nginx.pid"
nginx error log file: "/opt/nginx/logs/error.log"
nginx http access log file: "/opt/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

点赞 0
浏览 812

这个nginx 不能简单实现,需要自己开发代理页面。

点赞 0
浏览 569