Hallo, i have a Problem with my NGINX HLS Stream.... the rtmp stream comes to my Platforms Like Facebook and Youtube.
But the URL Page dont open... 403 Forbidden Shows the Page when i go on http:myip/hls
When i (the moment live) try to get the stream in index.html
No source compatible Source found... my Config File is that:
#user www-data;
worker_processes 1;
error_log logs/rtmp_error.log debug;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name HavannaInvestorsClub;
location /hls {
# Serve HLS fragments
# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';
# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
add_header 'Access-Control-Allow-Origin' '*';
}
}
}
rtmp {
server {
listen 1935;
chunk_size 8192;
application live{
live on;
record off;
meta copy;
hls on;
hls_path /tmp/hls;
allow publish all;
push "rtmp://live-api-s.facebook.com:80/rtmp/2"; #FB Profil
push "rtmp://live-api-s.facebook.com:80/rtmp/9"; #Minbuilder
}
so when i will open it on http://myip/ he didnt find a source
and when i open http://myip/hls/live a 404 error and without live a 403 Forbidden
Thanks for any help
But the URL Page dont open... 403 Forbidden Shows the Page when i go on http:myip/hls
When i (the moment live) try to get the stream in index.html
No source compatible Source found... my Config File is that:
#user www-data;
worker_processes 1;
error_log logs/rtmp_error.log debug;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name HavannaInvestorsClub;
location /hls {
# Serve HLS fragments
# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';
# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
add_header 'Access-Control-Allow-Origin' '*';
}
}
}
rtmp {
server {
listen 1935;
chunk_size 8192;
application live{
live on;
record off;
meta copy;
hls on;
hls_path /tmp/hls;
allow publish all;
push "rtmp://live-api-s.facebook.com:80/rtmp/2"; #FB Profil
push "rtmp://live-api-s.facebook.com:80/rtmp/9"; #Minbuilder
}
so when i will open it on http://myip/ he didnt find a source
and when i open http://myip/hls/live a 404 error and without live a 403 Forbidden
Thanks for any help