Thanks a lot, Jonathan and Francis!<div><br></div><div>It works great. I am able to significantly reduce the load. Here is my final configuration:</div><div><br></div><div><i> limit_req_zone $binary_remote_addr zone=ratezone:10m rate=3r/s;</i></div>
<div><div><i> server {</i></div><div><i> listen 80;</i></div><div><i> server_name <a href="http://www.example.com">www.example.com</a>;</i></div><div><i><br></i></div><div><i> location / {</i></div><div>
<i> limit_req zone=ratezone burst=5 nodelay;</i></div><div><i> proxy_pass <a href="http://appservers">http://appservers</a>;</i></div><div><i> }</i></div><div><i> }</i></div><div><i><br>
</i></div><div><i> server {</i></div><div><i> listen 80;</i></div><div><i> server_name ~.*;</i></div><div><i> location / {</i></div><div><i> access_log off;</i></div><div><i> return 503;</i></div>
<div><i> }</i></div><div><i> }</i></div><div><br></div><div>-Praveen</div><div><br></div><br><div class="gmail_quote">On Sat, Mar 16, 2013 at 3:38 AM, Francis Daly <span dir="ltr"><<a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Mar 16, 2013 at 02:34:32AM -0700, Praveen Yarlagadda wrote:<br>
<br>
Hi there,<br>
<div class="im"><br>
> I installed nginx on an EC2 instance.<br>
<br>
</div><div class="im">> Another weird thing is GET<br>
</div>> requests are starting with *"http://". *I never saw it before. Is there any<br>
<div class="im">> way I can filter requests or possibly throw 503?<br>
<br>
</div>These might be innocent requests from browsers configured to use your IP<br>
address as a proxy server. (Maybe there was a proxy server on a previous<br>
instance that used your current address?)<br>
<br>
I suggest making your current server{} blocks list all of the<br>
server_name:s that you want to handle, and then let the default<br>
server{} block handle these other requests, with "return 503" or any<br>
other configuration you like.<br>
<br>
See <a href="http://nginx.org/r/listen" target="_blank">http://nginx.org/r/listen</a> and <a href="http://nginx.org/r/server_name" target="_blank">http://nginx.org/r/server_name</a> for how<br>
to configure server names and the default server for a given address:port.<br>
<span class="HOEnZb"><font color="#888888"><br>
f<br>
<br>
--<br>
Francis Daly <a href="mailto:francis@daoine.org">francis@daoine.org</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>