Configuration of temporary links for TimeShift

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 between 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 in server/custom.ini of the middleware server

enable_timeshift_tmp_link = true