I can’t run kaltura vod module with nginx load balancer. It plays mp4 files on the remote server without any problems, but not in hls format. It gives 404 error.
upstream kalapi {
server 95.217.190.50;
server 95.217.176.134;
server 95.217.177.154;
}
server {
listen 95.217.132.184:80;
server_name 1.rectvideo.tk www.1.rectvideo.tk;
error_log /var/log/apache2/domains/1.rectvideo.tk.error.log error;
location / {
proxy_pass http://kalapi;
add_header ‘Access-Control-Allow-Credentials’ ‘true’ always;
add_header X-CdnHost $hostname always;
add_header X-Cached $upstream_cache_status always;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
expires 7d;
proxy_cache_valid 7d ;
proxy_cache_valid 404 1m;
}
location /hls/ {
add_header ‘Access-Control-Allow-Credentials’ ‘true’ always;
add_header X-CdnHost $hostname always;
add_header X-Cached $upstream_cache_status always;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
expires 7d;
proxy_cache_valid 7d ;
proxy_cache_valid 404 1m;
proxy_pass http://kalapi;
vod hls;
}
location /error/ {
alias /home/admin/web/1.rectvideo.tk/document_errors/;
}
location @fallback {
proxy_pass http://95.217.132.184:8080;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/nginx.1.rectvideo.tk.conf*;
}