Skip navigation

After standard installation and configuration TimeShift on the server, where channel are recorded, it is necessary to modify configuration file of NGINX on the storage - to add section at the beginning before other location sections:

location /tslink/ {
 
        rewrite ^/tslink/(.+)/archive/(\d+)/(.+) /stalker_portal/server/api/chk_tmp_timeshift_link.php?key=$1&file=$3 break;
 
        proxy_set_header Host 192.168.1.71; # <-- portal IP
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://192.168.1.71:88/; # <-- portal IP
    }
 
    location /archive/ {
        root /var/www; # <-- directory, where is archive folder (symlink RECORDS_DIR."archive")
        internal;
    }
 
    # is necessary to exclude "tslink" and "archive" section from the access to static files
    location ~* ^(?!(\/tslink|\/archive))\/.*\.(mpg|mpeg|avi|ts|mkv|mp4|mov|m2ts|flv|m4v|srt|sub|ass)$ {
 
        secure_link $arg_st,$arg_e;
        secure_link_md5 "supersecret$uri$remote_addr$arg_e";
 
        if ($secure_link = "") {
            return 403;
        }
 
        if ($secure_link = "0") {
            return 410;
        }
 
        root /var/www/bb1;
    }

For access closing to folder /archive/  using port 88 (apache) it is necessary to put .htaccess file with next

Deny from All

After NGINX configuration it is necessary to add the row

enable_timeshift_tmp_link = true

in the server/custom.ini  file of the middleware server.

Need Help

Cindy is an expert on the Ministra TV platform and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.