Why is Nginx ignoring the access_log directive when post_action is specified?
- by Chris
Hi,
in the location below nginx writes a custom download log. Everything
works fine except when there is a post_action directive.
I seems that nginx skips the access_log directive.
Here is the config:
location /download_intern/ {
internal;
if ($uri ~* ^/download_intern/([0-9]+)/) {
set $transferID $1;
set $server $arg_ip;
set $url $arg_url;
proxy_pass http://$server:80/$url;
break;
}
log_format download '$remote_addr [$time_local]
$upstream_cache_status "$scheme://$host$request_uri" $status
[$transferID] $body_bytes_sent';
access_log /opt/nginx/logs/server.download_log download;
# without this line the download log file is being written
post_action /done;
}
location /done {
internal;
# log the transfer on the main server
proxy_pass http://xxx.xxx.xxx.xxx:80/download_end/?tid=$transferID;
}