nginx ignores access_log directive when post_action specifie

Chris Kriebus lists at ruby-forum.com
Mon May 31 04:26:04 MSD 2010


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 but I don't understand
why. Any help is greatly appreciated.

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;
}
-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list