使用 acme 工具免费申请 SSL 证书

#curl https://get.acme.sh | sh

#vim ~/.bashrc

export CF_Key=”your_cloudflare_api_key”

export CF_Email=”your_email_address”

#source ~/.bashrc

#acme.sh –register-account -m [email protected] acme.sh –issue –dns dns_cf -d your_domain.com –debug

#acme.sh –install-cert -d your_domain.com –key-file /home/user/.acme.sh/your_domain.com_ecc/your_domain.com.key –fullchain-file /home/user/.acme.sh/your_domain.com_ecc/your_domain.com.cer –reloadcmd “sudo nginx -s reload”

nignx 直播流

  1. sudo apt update
  2. sudo apt install libnginx-mod-rtmp

打开配置文件nginx.conf,添加RTMP的配置。

rtmp {
server {
listen 1935;
chunk_size 4096;
application vod {
play /mnt/HDD80/vod;
}
application live {
live on;
record all;
record_unique on;
record_interval 5m;
record_suffix .mp4;
record_path /mnt/HDD80/record;
}

}
}

location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}

location /stat.xsl { 
    root /usr/share/doc/libnginx-mod-rtmp/examples/;
}