Quantcast
Channel: Nginx Forum - Other discussion
Viewing all articles
Browse latest Browse all 972

access_log if=$variable does not work on ip range

$
0
0
Hello,

I have am a long time nginx user, yesterday I was in need to log actions taken by several IP's within a nginx cluster across multi sites.
I thought to use the nginx 1.7.0+ access_log if=$variable to log these actions.

map $remote_addr $loggable {
default 0;
192.168.0.0/16 1;
}

access_log /path/to/iprange.log if=$loggable
I have to say it does work for single ip's quite well but it does not capture anything from ip ranges.

Is this the intended behavior?

Bogdan

Viewing all articles
Browse latest Browse all 972

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>