在将我的auth url更改为https后,我收到此消息。有没有办法把回调改成https,或者on_publish指令不支持?FYI - ngixn启用了ssl。
发布于 2021-08-24 10:44:38
我不知道你是否解决了这个问题,但我遇到了同样的问题。在研究中,on_*指令似乎不支持安全连接。
因此,我试图通过在http中本地提供web应用程序来解决这个问题,如下所示:
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
deny play all;
record off;
live on;
on_publish http://127.0.0.1:8080/api/stream;
on_done http://127.0.0.1:8080/api/stream/end;
}
}
}server {
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
root /var/www/html/myapp/public;
index index.html index.php;
server_name yourdomain.com www.yourdomain.com;
# rest of your config...
}
# then, serve your app on localhost for call api locally with http from on_* directives
server {
listen 8080;
listen [::]:8080;
server_name 127.0.0.1;
root /var/www/html/myapp/public;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
}如果它帮助了其他人:)
https://stackoverflow.com/questions/67175128
复制相似问题