<div dir="ltr"><div><div>Hello,<br><br></div> hotlinking protection works fine with chrome and gives 403 forbidden error but somehow it is not working for firefox clients and plays the forbidden video without restrictions. Following is the config :<br>
<br><br>server {<br> listen 80;<br> server_name <a href="http://lwx006.domain.com">lwx006.domain.com</a> <a href="http://lwx006.gear3rd.net">lwx006.gear3rd.net</a> <a href="http://lwx006.gear3rd.com">lwx006.gear3rd.com</a>;<br>
<br># limit_conn perip 2;<br> limit_rate 600k;<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/domain;<br>
index index.html index.htm index.php;<br><br>}<br><br>location ~ \.(flv|jpg|jpeg)$ {<br> flv;<br> root /var/www/html/domain;<br># limit_conn addr 5;<br># limit_req zone=one burst=12;<br>
# aio on;<br># directio 512;<br># output_buffers 1 512k;<br> expires 7d;<br># valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://gear3rd.net">gear3rd.net</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
if ($invalid_referer) {<br> return 403;<br> }<br> }<br>location ~ -720\.(mp4)$ {<br> mp4;<br> expires 7d;<br> limit_rate 2000k;<br>
root /var/www/html/domain;<br># valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://gear3rd.net">gear3rd.net</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
if ($invalid_referer) {<br> return 403;<br> }<br> }<br>location ~ -480\.(mp4)$ {<br> mp4;<br> expires 7d;<br># limit_rate 250k;<br>
root /var/www/html/domain;<br># valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://gear3rd.net">gear3rd.net</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
if ($invalid_referer) {<br> return 403;<br> }<br> }<br><br>location ~ -360\.(mp4)$ {<br> mp4;<br> expires 7d;<br># limit_rate 250k;<br>
root /var/www/html/domain;<br># valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://gear3rd.net">gear3rd.net</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
if ($invalid_referer) {<br> return 403;<br> }<br> }<br><br>location ~ \.(mp4)$ {<br> mp4;<br> root /var/www/html/domain;<br>
# limit_conn addr 40;<br># limit_req zone=one burst=4;<br># aio on;<br># directio 4m;<br># output_buffers 1 128k;<br> expires 7d;<br>
# valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
valid_referers none blocked <a href="http://domain.com">domain.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://facebook.com">facebook.com</a> *.<a href="http://twitter.com">twitter.com</a> *.<a href="http://domain.com">domain.com</a> *.<a href="http://gear3rd.net">gear3rd.net</a> <a href="http://tunemedia.tv">tunemedia.tv</a> <a href="http://www.tunemedia.tv">www.tunemedia.tv</a> <a href="http://embed.tunemedia.tv">embed.tunemedia.tv</a>;<br>
if ($invalid_referer) {<br> return 403;<br> }<br> }<br><br> # pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000">127.0.0.1:9000</a><br>
location ~ \.php$ {<br> root /var/www/html/domain;<br> fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br> fastcgi_index index.php;<br> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
include fastcgi_params;<br> }<br><br> location ~ /\.ht {<br> deny all;<br> }<br>}<br><br></div>Help will be highly appreciated !!<br><br>Regards.<br>Shahzaib<br></div>