<div dir="ltr"><table><tbody><tr><td class="">
<br></td>
<td class="">
<div>
<div class="">
<p>we're running high traffic streaming website similar to
youtube, due to large number of streams on daily basis, our server is
consuming 10~12TB bandwidh per day. We're using nginx-1.2.1 and want to
restrict users to download videos but don't want to restrict streams from our website. We also tried "limiting
download connections per ip (limit_conn addr 1), but the problem is if 2~3 users are streaming videos from
our site on same Lan with single ip, the stream will stop working for 2
others and will display (stream not found) error .I am newbie to nginx, can anyone help me on optimizing
bandwidth security for nginx? My particular host config settings are
given below :-</p>
<p>limit_conn_zone $binary_remote_addr zone=addr:5m;<br>server {<br> listen 80;<br> server_name <a href="http://content.com">content.com</a>;<br><br> client_max_body_size 800m;<br><br> limit_rate 100k;<br>
# access_log /websites/<a href="http://theos.in/logs/access.log">theos.in/logs/access.log</a> main;<br><br> location / {<br> root /var/www/html/site;<br> index index.html index.htm index.php;<br>
<br>}<br>location /files/videos {<br> root /var/www/html/site;<br> limit_conn addr 1;<br>}<br><br>location ~ \.(flv)$ {<br> flv;<br> root /var/www/html/site;<br> limit_conn addr 1;<br>
valid_referers none blocked <a href="http://content.com">content.com</a>;<br> if ($invalid_referer) {<br> return 403;<br> }<br> }<br><br>
</p>
<p>I think the above config is enough to identify the issue. please let me know if you understand about what i am trying to explain.<br></p>
</div></div></td></tr></tbody></table></div>