Hi all,
I just come across an failure while logging an access log.
Here is the nginx.conf:
server{
listen 80;
server_name localhost;
access_log logs/access.log main;
location / {
A;
}
location /sub {
proxy_pass http://somewhere ;
}
location /test {
echo "it logs.";
}
}
In my http handler A, it generates a sub-request to /sub with an NGX_HTTP_SUBREQUEST_IN_MEMORY flag:
ngx_int_t rc = ngx_http_subrequest(r, &sub_location, NULL, &sr, psr, NGX_HTTP_SUBREQUEST_IN_MEMORY);
Then A will process the response of the sub-request, and finally send back to requester.
However, nginx writes down not a single line of logs when:
curl http://localhost/
But it would exactly write down some information if:
curl http://localhost/test
HELP PLZ.