Opened 5 years ago
Closed 5 years ago
#1807 closed defect (worksforme)
SSI include subrequests are not logged
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-core | Version: | 1.17.x |
Keywords: | Cc: | ||
uname -a: | Linux lb5 4.4.0-148-generic #174-Ubuntu SMP Tue May 7 12:20:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: | nginx version: nginx/1.17.0 |
Description
Despite using the log_subrequest configuration option, the subrequests generated by SSI includes (<!--#include virtual="[url]" -->) are not logged to the access log.
Here are the log related options in my config :
log_format extended '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$host" $request_time "$upstream_http_x_backend_name" $scheme upstream_response_time=$upstream_response_time'; log_subrequest on; access_log /data/self/logs/nginx/access-all.log extended; log_format minimal_stats '$is_bot $host $status $body_bytes_sent $request_time $upstream_response_time'; access_log syslog:server=192.168.2.33 minimal_stats;
Otherwise, the SSI includes are working perfectly, they are just not logged as expected.
Note:
See TracTickets
for help on using tickets.
Works fine here. Most likely the problem is that with your log formats it's hardly possible to tell which log line corresponds to a subrequest, since $request refers to the HTTP request line from the original client request, and will be exactly the same for subrequests.