<br><br><div class="gmail_quote">On Wed, Jan 4, 2012 at 2:03 AM, Cabbar Duzayak <span dir="ltr"><<a href="mailto:cabbar@gmail.com">cabbar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br></blockquote><div><br></div><div>[..snip..]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can we at least tell Nginx not to log these? Something like, if there<br>
is no http method / url, skip the log?<br>
<br></blockquote></div><div><br></div><div><br></div>It's very likely that there's no Host header sent, so it's being directed to the server set as "default".<div><br></div><div>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. </div>
<div>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</div><div><br></div><div>#catch all</div><div><div><div> server {</div>
<div> listen 80 default_server;</div><div> server_name <a href="http://localhost.domain.com">localhost.domain.com</a> localhost 127.0.0.1 xx.xx.xx.xx; #where xx.xx.xx.xx is the local IP</div><div> access_log off;</div>
<div> location / {</div><div> #local</div><div> allow 127.0.0.1;</div><div> #office router</div><div> allow xx.xx.xx.xx;</div><div> #protect </div><div> deny all;</div>
<div> } </div><div> } </div></div></div><div> </div><div>#real server(s)</div><div> server {</div><div> access_log /var/log/nginx/access.log;</div><div> listen 80;</div><div> server_name .<a href="http://domain.com">domain.com</a>; #matches <a href="http://www.domain.com">www.domain.com</a> and <a href="http://domain.com">domain.com</a></div>
<div> location / {</div><div> #[..snip..]</div><div> }</div><div> }</div><div><br></div><div> </div><div><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span style="color:gray">Will 'Mit' Rowe<br>
Stagename</span><i><br></i><span style="color:rgb(153,153,153)">1-866-326-3098</span><br><span style="color:rgb(153,153,153)"><a href="mailto:josh@stagename.com" style="color:rgb(42,93,176)" target="_blank">mit@stagename.com</a></span><br style="color:rgb(153,153,153)">
<span style="color:rgb(153,153,153)"><a href="http://www.stagename.com/" style="color:rgb(42,93,176)" target="_blank">www.stagename.com</a></span><br><span style="color:rgb(153,153,153)">Twitter: @stagename</span><br style="color:rgb(153,153,153)">
<br style="color:rgb(153,153,153)"><span style="font-size:8pt;color:rgb(153,153,153)"></span><i><span style="font-size:8pt;color:gray">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.</span></i><span style="font-size:8pt;color:gray"></span> </span><br>
</div>