On Mon, Jul 22, 2013 at 09:27:59AM +0500, shahzaib shahzaib wrote:
Hi there,
> location ~ -720\.(mp4)$ {
> mp4;
> expires 7d;
> limit_rate 500k;
> root /var/www/html/videos;
> valid_referers none blocked domain.com;
> if ($invalid_referer) {
> return 403;
> }
> }
> location ~ -480\.(mp4)$ {
> mp4;
> expires 7d;
> limit_rate 250k;
> root /var/www/html/videos;
> valid_referers none blocked domain.com;
> if ($invalid_referer) {
> return 403;
> }
> }
> location ~ \.(mp4)$ {
> mp4;
> expires 7d;
> root /var/www/html/videos;
> valid_referers none blocked domain.com;
> if ($invalid_referer) {
> return 403;
> }
> }
It looks reasonable from here.
The various repeated directives may fit better one level higher, but
that depends on the rest of the configuration.
The parentheses ("()") around mp4 in the locations look unnecessary.
But if it does what you want, it's good.
f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx