Welcome! Log In Create A New Profile

Advanced

nginx ignores access_log directive when post_action specifie

Chris Kriebus
May 30, 2010 08:32PM
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/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx ignores access_log directive when post_action specifie

Chris Kriebus May 30, 2010 08:32PM

Re: nginx ignores access_log directive when post_action specifie

rishabh February 10, 2012 01:29AM

Re: nginx ignores access_log directive when post_action specifie

Maxim Dounin February 10, 2012 02:32AM

Re: nginx ignores access_log directive when post_action specifie

rishabh February 20, 2012 07:28AM

Re: nginx ignores access_log directive when post_action specifie

Maxim Dounin February 20, 2012 10:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready