But this does not work. I have also tried putting the if and access_log
check in the http directive. But access_log commands are not allowed
there. So we might want to update the context docs here. http://wiki.nginx.org/NginxHttpLogModule
Also, I am using Nginx 0.7.65
Does anyone have an idea of how I can stop logging these requests?
The only option you have is to turn off logging for the default
server on the port in question (and turn it on again for
individual locations if desired). Try something like this:
Such “requests” doesn’t pass normal request processing pipeline as
they aren’t really requests and even connection to client is
already closed. They are logged in configuration context which
happens to be here - default server’s one.
Does anyone have an idea of how I can stop logging these requests?
access_log /path/to/log;
…
}
}
Such “requests” doesn’t pass normal request processing pipeline as
they aren’t really requests and even connection to client is
already closed. They are logged in configuration context which
happens to be here - default server’s one.
Thanks for the suggestion. That works.
I might try making a new server default with the access_log off just for
it. If that does not work, I will have a lot of access_log directives.
Thanks for the suggestion. That works.
I might try making a new server default with the access_log off just for
it. If that does not work, I will have a lot of access_log directives.
I have tried both ways.
So far I think the best solution is make new default servers that have
access_log off;
I.e.
Dummy entry to stop empty tcp opens in the logs
server {
listen 80 default;
access_log off;
}
server {
listen 80
server_name example.com
access_log /path/to/log;
}
This way I don’t have to put access_log directives in all of my location
directives.
Is this suitable or am I missing something important?
Thanks,
Zev
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.