Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #user nobody;
- events {
- }
- worker_rlimit_nofile 20000;
- # need testing fisrt for transcoding/hls..
- #rtmp {
- #server {
- #listen 1935;
- #chunk_size 4000;
- #application live {
- #live on;
- #hls on;
- #hls_continuous on;
- #hls_nested on;
- #hls_fragment 10s;
- #hls_cleanup off;
- #hls_path /home/hls-files/hls2;
- #hls_variant _160p BANDWIDTH=446000;
- #hls_variant _240p BANDWIDTH=596000;
- #hls_variant _360p2 BANDWIDTH=896000;
- #hls_variant _360p1 BANDWIDTH=1296000;
- #hls_variant _480p3 BANDWIDTH=1346000;
- #hls_variant _480p2 BANDWIDTH=1596000;
- #hls_variant _480p1 BANDWIDTH=2096000;
- #}
- #}
- #}
- http {
- include mime.types;
- default_type application/octet-stream;
- #access_log off;
- access_log logs/access.log combined;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 30;
- #gzip on;
- proxy_cache_path /home/hls-files/proxycache levels=1:2 keys_zone=chunks:1000m max_size=10000m;
- proxy_cache_path /usr/local/nginx/cache levels=1:2 keys_zone=cache-httpd:100m max_size=1000m;
- proxy_temp_path /usr/local/nginx/cache/tmp;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # donβt use SSLv3 ref: POODLE
- #only show nginx in Server header insead of nginx-ecdf/1...
- server_tokens off;
- server {
- listen 50.97.142.130:80;
- server_name localhost;
- #charset koi8-r;
- #root /home/hls-files;
- #location ~* ^/hls2/(.*)\.m3u8 {
- # add_header Cache-Control no-cache;
- #}
- rewrite ^/hls/(.*) /hls1/$1 break;
- rewrite ^/hls2/(.*)\.smil /live/$1.smil break;
- #location / {
- # rewrite index.html break;
- #}
- location ~* ^/live/(.*)\.(smil|m3u8) {
- # put name server here
- proxy_pass live://s3;
- }
- location ~* ^/hls1/(.*)\.(smil|m3u8) {
- # put name server here
- proxy_pass ecdf://s3;
- }
- location ~* ^/hls1/(.*)\.ts {
- # if ($http_user_agent !~* "iPhone|iPad|iPod|Mac OS X|Android|Roku|SmartTV") {
- # return 403;
- #}
- proxy_cache_min_uses 0;
- proxy_cache_key "$uri";
- proxy_set_header Cache-Control Public;
- proxy_cache chunks;
- proxy_cache_valid 200 302 60m;
- # put name server here
- proxy_pass ecdf://s3;
- }
- location ~* ^/hls2/(.*)\.m3u8 {
- # put name server here
- proxy_pass live://s3;
- }
- location ~* ^/hls2/(.*)\.ts {
- if ($http_user_agent !~* "iPhone|iPad|iPod|Mac OS X|Android|Roku|SmartTV") {
- return 403;
- }
- proxy_cache_min_uses 0;
- proxy_cache_key "$uri";
- proxy_set_header Cache-Control Public;
- proxy_cache chunks;
- proxy_cache_valid 200 302 60m;
- # put name server here
- proxy_pass live://s3;
- }
- location = /crossdomain.xml {
- root html;
- }
- location = /stats {
- stub_status on;
- }
- location = /stats/active {
- rewrite (.*) /$connections_active redirect;
- }
- #location /stat {
- # rtmp_stat all;
- # rtmp_stat_stylesheet stat.xsl;
- #}
- #location /stat.xsl {
- # root html;
- #}
- }
- server {
- listen 50.97.142.130:80;
- server_name static.elcanaldelfutbol.com s3.elcanaldelfutbol.com origin.elcanaldelfutbol.com;
- gzip on;
- gzip_vary on;
- location ~* ^/(videoUploadChunked) {
- client_max_body_size 100M;
- proxy_ignore_headers Set-Cookie;
- proxy_ignore_headers Cache-Control;
- proxy_pass http://127.0.0.1:8888;
- }
- location /ecviplay/ {
- add_header Cache-Control public;
- add_header Cache-Control must-revalidate;
- expires 7d;
- root /disk1;
- rewrite ^/ecviplay/(.*) /$1 break;
- error_page 404 = @fallback;
- }
- location @fallback {
- add_header Cache-Control public;
- add_header Cache-Control must-revalidate;
- expires 7d;
- root /disk2;
- }
- location / {
- proxy_pass http://10.60.16.50;
- proxy_set_header Host $host;
- proxy_cache cache-httpd;
- proxy_cache_key "$scheme$host$request_uri";
- proxy_cache_valid any 1m;
- }
- location ~ /\.ht {
- deny all;
- }
- }
- server {
- listen 50.97.142.130:80;
- server_name ecuavisaplay.com www.ecuavisaplay.com;
- #gzip on;
- #gzip_vary on;
- location ~ ^/(?:dynamic|load|account|json)/(.*) {
- proxy_pass http://127.0.0.1:8888;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header HTTP_CF_IPCOUNTRY $http_cf_ipcountry;
- break;
- }
- location / {
- proxy_pass http://10.60.16.50;
- proxy_set_header Host $host;
- }
- }
- server {
- listen 174.127.72.182:80;
- server_name sv1;
- gzip on;
- gzip_vary on;
- location ~* \.(jpg|jpeg|gif|png|bmp|ico|pdf|flv|swf|html|htm|txt|css|js)$ {
- add_header Cache-Control public;
- add_header Cache-Control must-revalidate;
- expires 7d;
- root /srv/www/htdocs;
- }
- location / {
- client_max_body_size 10M;
- proxy_pass http://127.0.0.1:6464;
- proxy_set_header Host $host;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement