Welcome! Log In Create A New Profile

Advanced

RE: "access_log" directive is not allowed here in... how to do this properly?

Micheal Wolfskill
March 25, 2012 06:44PM
Thanks.. but i think you are not understanding me.. the problem is that the log line is throwing an error. So i cannot log.

This is the line that is throwing that error if ($log) { access_log /root/access-selected-slim.log slim; }
I have that line inside my server {} .. thats where i need it.


If i cant do it this way.. how can I do it then?

Mike

> Date: Sun, 25 Mar 2012 23:32:31 +0100
> From: francis@daoine.org
> To: nginx@nginx.org
> Subject: Re: "access_log" directive is not allowed here in... how to do this properly?
>
> On Sun, Mar 25, 2012 at 07:21:20PM +0000, Micheal Wolfskill wrote:
>
> Hi there,
>
> > Iam trying to log the requests coming from a list of countries into a seperate log file..
>
> > map $geoip_country_code $log {
> > default 0;
> > CN 1; #"China"
>
> > }
>
> access_log logs/$log.log;
>
> You may want to make the content of $log be more descriptive: "access"
> and "special" instead of 0 and 1, for example.
>
> Or just log normally, and post-process the file to split based on the
> logged IP address.
>
> f
> --
> Francis Daly francis@daoine.org
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

"access_log" directive is not allowed here in... how to do this properly?

Micheal Wolfskill March 25, 2012 03:22PM

Re: "access_log" directive is not allowed here in... how to do this properly?

Francis Daly March 25, 2012 06:34PM

RE: "access_log" directive is not allowed here in... how to do this properly?

Micheal Wolfskill March 25, 2012 06:44PM

Re: "access_log" directive is not allowed here in... how to do this properly?

Francis Daly March 25, 2012 07:10PM

RE: "access_log" directive is not allowed here in... how to do this properly?

Micheal Wolfskill March 25, 2012 07:16PM

Re: "access_log" directive is not allowed here in... how to do this properly?

Francis Daly March 25, 2012 07:22PM

RE: "access_log" directive is not allowed here in... how to do this properly?

Micheal Wolfskill March 25, 2012 07:42PM

Re: "access_log" directive is not allowed here in... how to do this properly?

Francis Daly March 25, 2012 08:06PM

Re: "access_log" directive is not allowed here in... how to do this properly?

Alexander Kolesen March 25, 2012 07:30PM

RE: "access_log" directive is not allowed here in... how to do this properly?

Micheal Wolfskill March 25, 2012 08:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
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