I can't run kaltura vod module with nginx load balancer.

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*;

}


Hi @rectvapp,

The Kaltura Nginx VOD module supports 3 different work modes:

Local - serve locally accessible files (local disk/NFS mounted)
Remote - serve files accessible via HTTP using range requests
Mapped - serve files according to a specification encoded in JSON format. The JSON can pulled from a remote server, or read from a local file

Please elaborate as to your exact setup and I’ll help you further.
Do you have a Kaltura CE server installed or a different config on the server side that will return the expected JSON format?

Also, see sample configurations per mode here:

Cheers,