Welcome! Log In Create A New Profile

Advanced

Re: Empty /error log lines (a lot of them)

Cabbar Duzayak
January 06, 2012 10:28AM
This worked great!

Thanks a lot for your help.

On Wed, Jan 4, 2012 at 8:27 PM, Mit Rowe <mit@stagename.com> wrote:
>
>
> On Wed, Jan 4, 2012 at 2:03 AM, Cabbar Duzayak <cabbar@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@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@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

Empty /error log lines (a lot of them)

Cabbar Duzayak January 03, 2012 08:34AM

Re: Empty /error log lines (a lot of them)

Maxim Dounin January 03, 2012 05:02PM

Re: Empty /error log lines (a lot of them)

Michael Kliewe January 03, 2012 08:58PM

Re: Empty /error log lines (a lot of them)

Cabbar Duzayak January 04, 2012 02:04AM

Re: Empty /error log lines (a lot of them)

Mit Rowe January 04, 2012 01:28PM

Re: Empty /error log lines (a lot of them)

Cabbar Duzayak January 06, 2012 10:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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