I have a list of blacklisted domains in a file. For these domains I want
to
log to a different log file. I assume i have to write nginx module for
this. Or do we have some other way to do this?
Since there are too many blacklisted domains and they will change quite
often, creating vhosts is tough.
If I have to write a module for this, could any please be kind enough to
tell me the best practices. I did read Emiller’s Guide to Nginx Module Development – Evan Miller but it doesn’t say
much
on how to work at logging phase (i want my log file to get reopened at
at
USR1).
I don’t think map and log will help me solve it, I need to log to a
separate file if condition is matched.
Writing two sections with one pointing to default log (with map
condition
saying, no match to blacklist domains in the file) and other to
blacklist_log file with the opposite condition might solve the problem
but
won’t it affect the performance? won’t 2 pattern affect the performance?
Also 1.70 doesn’t seem to be stable yet.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.