Nginx-accesskey Privilege Module Use--Simple m3u8 anti-theft chain

Source: Internet
Author: User
Tags curl xsl

Configuration file: http://www.cnblogs.com/tinywan/p/5983694.html

Through the encrypted file:

Correct address: Curl-i HTTP//Access IP address (here is the live node IP address)/hls/s0000_8.m3u8?key=c7e2d8f498920f1a86e4c95d4a58a27e
Parameter Error Address: Curl-i HTTP//Access IP address (here is the live node IP address)/hls/s0000_8.m3u8?key=c7e2d8f498920f1a86e4c95d4a58a27123213
No parameters: Curl-i http//IP address (this is the live node IP address)/hls/s0000_8.m3u8

"1" correct address: Curl-i HTTP//Access IP address (here is the live node IP address)/hls/s0000_8.m3u8?key=c7e2d8f498920f1a86e4c95d4a58a27e

[Email protected]:/home/tinywan$ curl-i http//IP address (here is the live node IP address)/hls/s0000_8.m3u8?key= c7e2d8f498920f1a86e4c95d4a58a27ehttp/1.1 Okserver:nginx/1.8.1date:fri, Oct 09:12:39 GMTContent-Type: Application/vnd.apple.mpegurlcontent-length:367last-modified:fri, Oct 09:12:34 Gmtconnection:keep-aliveetag : "5809dc02-16f" Cache-control:no-cacheaccess-control-allow-origin: *accept-ranges:bytes#extm3u#ext-x-version:3# Ext-x-media-sequence:300#ext-x-targetduration:7#ext-x-key:method=aes-128,uri= "https://myserver.com/keys/S0000_ 8-300.key ", iv=0x0000000000000000000000000000012c#extinf:7.000,s0000_8-300.ts#extinf:7.000,s0000_8-301.ts# extinf:7.000,

"2" Parameter Error Address: Curl-i HTTP//Access IP address (here is the live node IP address)/hls/s0000_8.m3u8?key=c7e2d8f498920f1a86e4c95d4a58a27123213

[Email protected]:/home/tinywan$ curl-i http//IP address (here is the live node IP address)/hls/s0000_8.m3u8?key= c7e2d8f498920f1a86e4c95d4a58a27123213http/1.1 403 Forbiddenserver:nginx/1.8.1date:fri, OCT 2016 09:14:30 Gmtcontent-type:text/htmlcontent-length:168connection:keep-alive<HTML><Head><title>403 Forbidden</title></Head><Bodybgcolor= "White"><Center><H1>403 Forbidden</H1></Center><HR><Center>nginx/1.8.1</Center></Body></HTML>

"3" does not carry parameter access: Curl-i HTTP//IP address (here is the live node IP address)/hls/s0000_8.m3u8

[email protected]:/home/tinywan$ curl-i/HTTP IP address (here is the live node IP address)/hls/s0000_8.m3u8http/1.1 403 Forbiddenserver:nginx/1.8.1date:fri, Oct 09:15:15 gmtcontent-type:text/htmlcontent-length:168connection: Keep-alive<HTML><Head><title>403 Forbidden</title></Head><Bodybgcolor= "White"><Center><H1>403 Forbidden</H1></Center><HR><Center>nginx/1.8.1</Center></Body></HTML>[Email protected]:/home/tinywan$

"4" Nginx Config profile:

HTTP {include mime.types;    Default_type Application/octet-stream; Log_format main ' [$time _local][$remote _addr][$http _x_forwarded_for] $status "$request" "$http _referer" "$http _user_    Agent "';    Access_log Logs/access.log Main;    Sendfile on;    Keepalive_timeout 65;        server {listen 443 SSL;        server_name example.com;        #ssl_certificate/var/ssl/example.com.cert;        #ssl_certificate_key/var/ssl/example.com.key;        Location/keys {root/tmp;        }} server {set $wwwroot/home/www/node/html;        Listen 80;        server_name 127.0.0.1;        Index index.html;        Root $wwwroot;        Access_log Logs/node.access.log Main;            Location/rtmp/stat {Rtmp_stat all;        Rtmp_stat_stylesheet rtmpstat.xsl;        } location/rtmpstat.xsl {} location/rtmp/control {Rtmp_control all; } Location ~*/hls/.*\.m3u8$ {types {Application/vnd.apple.mpegurl m3u8;            } root/tmp;            Add_header Cache-control No-cache;           Add_header Access-control-allow-origin *; accesskey on;                Accesskey_hashmethod MD5;                Accesskey_arg "Key";                #accesskey_signature "Password$remote_addr"; Accesskey_signature "password120.26.206.180";         } location ~*/hls/.*\.ts$ {types {video/mp2t ts;            } root/tmp;            Expires 1m;            Add_header Cache-control public;        Add_header Access-control-allow-origin *;        } #error_page 404/404.html;        Error_page 502 503 504/50x.html;        Location =/50x.html {root html;                } Location/hls {accesskey on;                Accesskey_hashmethod MD5;                Accesskey_arg "Key";                Accesskey_signature "Password$remote_addr";                #accesskey_signature "password115.29.201.161";        Alias/tmp/hls;        } location/control {Rtmp_control all;        }}}rtmp {server {listen 1935;        Ping 30s;        Notify_method get;        Drop_idle_publisher 3s;            Application Live {live on; #pull rtmp://121.40.133.183/live/206 name=206;            #exec/home/www/bin/rtmphls.sh $name;            Exec/home/www/bin/autorecord.sh $name;            Exec_kill_signal term;            #exec_play/home/www/bin/execplay.sh $name;            #on_play Http://sewise.amai8.com/authcheck/play;                       #录像模块 Recorder REC1 {record all manual;                       Record_unique on;                       Record_notify on;                       Record_max_size 512M;                       #record_interval 30s;                       Record_path/data/recorded_flvs;                       Record_suffix all.flv; #录像停止后, the first to determine whether to upload, allowing the video upload to the oss/exec_record_done/home/www/bin/rtmprecorded.sh $name $path $filename           $basename $dirname;        }} HLS on;        Hls_path/tmp/hls;    #hls_sync 100ms;Hls_keys on;        #hls_key_path/tmp/keys;        Hls_key_url https://myserver.com/keys/; Hls_fragments_per_key;}}

Nginx-accesskey Privilege Module Use--Simple m3u8 anti-theft chain

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.