Welcome! Log In Create A New Profile

Advanced

Re: nginx ignores access_log directive when post_action specifie

February 20, 2012 07:28AM
Hi,

I am trying to log into two files. one default and one custom via post_action.

http {
access_log /var/log/nginx/access.log;

server {
location @postactionlocation {
set_by_lua_file $logdata /var/www/log.lua;
access_log /var/log/nginx/access2.log '$logdata';
return 444;
}

location / {
#someproxypass here
}

post_action @postactionlocation;
}


In this case only access2.log(via post_action) is written and not the default access.log(in http)

What would be an optimal solution.

Thanks

--
Rishabh


Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Fri, Feb 10, 2012 at 01:29:26AM -0500, rishabh
> wrote:
>
> > I am facing the same problem, is there any
> update on this issue ?
>
> Logging happens in a location where request
> completes, and with
> post_action it's the location where post_action
> processed.
> So the problem looks like configuration one.
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.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: 267
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