Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. #user nobody;
  2.  
  3. events {
  4.  
  5. }
  6.  
  7. worker_rlimit_nofile 20000;
  8.  
  9. # need testing fisrt for transcoding/hls..
  10. #rtmp {
  11. #server {
  12. #listen 1935;
  13. #chunk_size 4000;
  14.  
  15. #application live {
  16. #live on;
  17.  
  18. #hls on;
  19. #hls_continuous on;
  20. #hls_nested on;
  21. #hls_fragment 10s;
  22. #hls_cleanup off;
  23. #hls_path /home/hls-files/hls2;
  24.  
  25. #hls_variant _160p BANDWIDTH=446000;
  26. #hls_variant _240p BANDWIDTH=596000;
  27. #hls_variant _360p2 BANDWIDTH=896000;
  28. #hls_variant _360p1 BANDWIDTH=1296000;
  29. #hls_variant _480p3 BANDWIDTH=1346000;
  30. #hls_variant _480p2 BANDWIDTH=1596000;
  31. #hls_variant _480p1 BANDWIDTH=2096000;
  32. #}
  33. #}
  34. #}
  35.  
  36. http {
  37. include mime.types;
  38.  
  39. default_type application/octet-stream;
  40.  
  41. #access_log off;
  42.  
  43. access_log logs/access.log combined;
  44.  
  45. sendfile on;
  46. #tcp_nopush on;
  47.  
  48. #keepalive_timeout 0;
  49. keepalive_timeout 30;
  50.  
  51. #gzip on;
  52.  
  53. proxy_cache_path /home/hls-files/proxycache levels=1:2 keys_zone=chunks:1000m max_size=10000m;
  54.  
  55. proxy_cache_path /usr/local/nginx/cache levels=1:2 keys_zone=cache-httpd:100m max_size=1000m;
  56.  
  57. proxy_temp_path /usr/local/nginx/cache/tmp;
  58.  
  59. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE
  60.  
  61. #only show nginx in Server header insead of nginx-ecdf/1...
  62. server_tokens off;
  63.  
  64. server {
  65. listen 50.97.142.130:80;
  66. server_name localhost;
  67.  
  68. #charset koi8-r;
  69.  
  70. #root /home/hls-files;
  71. #location ~* ^/hls2/(.*)\.m3u8 {
  72. # add_header Cache-Control no-cache;
  73. #}
  74.  
  75. rewrite ^/hls/(.*) /hls1/$1 break;
  76.  
  77. rewrite ^/hls2/(.*)\.smil /live/$1.smil break;
  78. #location / {
  79. # rewrite index.html break;
  80. #}
  81. location ~* ^/live/(.*)\.(smil|m3u8) {
  82. # put name server here
  83. proxy_pass live://s3;
  84. }
  85.  
  86. location ~* ^/hls1/(.*)\.(smil|m3u8) {
  87. # put name server here
  88. proxy_pass ecdf://s3;
  89. }
  90.  
  91. location ~* ^/hls1/(.*)\.ts {
  92. # if ($http_user_agent !~* "iPhone|iPad|iPod|Mac OS X|Android|Roku|SmartTV") {
  93. # return 403;
  94. #}
  95.  
  96. proxy_cache_min_uses 0;
  97. proxy_cache_key "$uri";
  98. proxy_set_header Cache-Control Public;
  99. proxy_cache chunks;
  100. proxy_cache_valid 200 302 60m;
  101.  
  102. # put name server here
  103. proxy_pass ecdf://s3;
  104. }
  105.  
  106. location ~* ^/hls2/(.*)\.m3u8 {
  107. # put name server here
  108. proxy_pass live://s3;
  109. }
  110.  
  111. location ~* ^/hls2/(.*)\.ts {
  112. if ($http_user_agent !~* "iPhone|iPad|iPod|Mac OS X|Android|Roku|SmartTV") {
  113. return 403;
  114. }
  115.  
  116. proxy_cache_min_uses 0;
  117. proxy_cache_key "$uri";
  118. proxy_set_header Cache-Control Public;
  119. proxy_cache chunks;
  120. proxy_cache_valid 200 302 60m;
  121.  
  122. # put name server here
  123. proxy_pass live://s3;
  124. }
  125.  
  126. location = /crossdomain.xml {
  127. root html;
  128. }
  129.  
  130. location = /stats {
  131. stub_status on;
  132. }
  133.  
  134. location = /stats/active {
  135. rewrite (.*) /$connections_active redirect;
  136. }
  137.  
  138. #location /stat {
  139. # rtmp_stat all;
  140. # rtmp_stat_stylesheet stat.xsl;
  141. #}
  142.  
  143. #location /stat.xsl {
  144. # root html;
  145. #}
  146. }
  147.  
  148. server {
  149. listen 50.97.142.130:80;
  150. server_name static.elcanaldelfutbol.com s3.elcanaldelfutbol.com origin.elcanaldelfutbol.com;
  151.  
  152. gzip on;
  153. gzip_vary on;
  154.  
  155. location ~* ^/(videoUploadChunked) {
  156. client_max_body_size 100M;
  157.  
  158. proxy_ignore_headers Set-Cookie;
  159. proxy_ignore_headers Cache-Control;
  160.  
  161. proxy_pass http://127.0.0.1:8888;
  162. }
  163.  
  164. location /ecviplay/ {
  165. add_header Cache-Control public;
  166. add_header Cache-Control must-revalidate;
  167. expires 7d;
  168.  
  169. root /disk1;
  170.  
  171. rewrite ^/ecviplay/(.*) /$1 break;
  172.  
  173. error_page 404 = @fallback;
  174. }
  175.  
  176. location @fallback {
  177. add_header Cache-Control public;
  178. add_header Cache-Control must-revalidate;
  179. expires 7d;
  180. root /disk2;
  181. }
  182.  
  183. location / {
  184. proxy_pass http://10.60.16.50;
  185. proxy_set_header Host $host;
  186.  
  187. proxy_cache cache-httpd;
  188. proxy_cache_key "$scheme$host$request_uri";
  189. proxy_cache_valid any 1m;
  190. }
  191.  
  192. location ~ /\.ht {
  193. deny all;
  194. }
  195. }
  196.  
  197.  
  198. server {
  199. listen 50.97.142.130:80;
  200. server_name ecuavisaplay.com www.ecuavisaplay.com;
  201.  
  202. #gzip on;
  203. #gzip_vary on;
  204.  
  205. location ~ ^/(?:dynamic|load|account|json)/(.*) {
  206. proxy_pass http://127.0.0.1:8888;
  207. proxy_set_header X-Real-IP $remote_addr;
  208. proxy_set_header HTTP_CF_IPCOUNTRY $http_cf_ipcountry;
  209. break;
  210. }
  211.  
  212. location / {
  213. proxy_pass http://10.60.16.50;
  214. proxy_set_header Host $host;
  215. }
  216. }
  217.  
  218. server {
  219. listen 174.127.72.182:80;
  220. server_name sv1;
  221.  
  222. gzip on;
  223. gzip_vary on;
  224.  
  225. location ~* \.(jpg|jpeg|gif|png|bmp|ico|pdf|flv|swf|html|htm|txt|css|js)$ {
  226. add_header Cache-Control public;
  227. add_header Cache-Control must-revalidate;
  228. expires 7d;
  229. root /srv/www/htdocs;
  230. }
  231.  
  232. location / {
  233. client_max_body_size 10M;
  234.  
  235. proxy_pass http://127.0.0.1:6464;
  236. proxy_set_header Host $host;
  237. }
  238. }
  239.  
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement