Empty /error log lines (a lot of them)
Cabbar Duzayak
cabbar at gmail.com
Fri Jan 6 15:26:59 UTC 2012
This worked great!
Thanks a lot for your help.
On Wed, Jan 4, 2012 at 8:27 PM, Mit Rowe <mit at stagename.com> wrote:
>
>
> On Wed, Jan 4, 2012 at 2:03 AM, Cabbar Duzayak <cabbar at gmail.com> wrote:
>>
>> Hi,
>>
>
> [..snip..]
>
>>
>> Can we at least tell Nginx not to log these? Something like, if there
>> is no http method / url, skip the log?
>>
>
>
> It's very likely that there's no Host header sent, so it's being directed to
> the server set as "default".
>
> In my setup i define a server{} section for every real host, and then add a
> separate "catch all" one for everything else and turn off the logs when not
> debugging.
> If you are able to do something similar, it should capture those spurious
> connections, direct them to the default host, and not log the lines
>
> #catch all
> server {
> listen 80 default_server;
> server_name localhost.domain.com localhost 127.0.0.1 xx.xx.xx.xx;
> #where xx.xx.xx.xx is the local IP
> access_log off;
> location / {
> #local
> allow 127.0.0.1;
> #office router
> allow xx.xx.xx.xx;
> #protect
> deny all;
> }
> }
>
> #real server(s)
> server {
> access_log /var/log/nginx/access.log;
> listen 80;
> server_name .domain.com; #matches www.domain.com and domain.com
> location / {
> #[..snip..]
> }
> }
>
>
>
>
> --
> Will 'Mit' Rowe
> Stagename
> 1-866-326-3098
> mit at stagename.com
> www.stagename.com
> Twitter: @stagename
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of this
> information by persons or entities other than the intended recipient is
> prohibited. If you received this transmission in error, please contact the
> sender and delete all material contained herein from your computer.
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list