Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2016-12-04 04:22:11

discuss4u
Member
Registered: 2013-03-06
Posts: 163

Video download problem for video server

I am using Nginx to serve videos

I found that download only works when

define('NGINX', false);
define('NGINX_SECURE_LINK', false);

are declared in download.php

Is there anything I have to set in order to make it work with declaring them to be TRUE.

Thanks!

Offline

#2 2016-12-04 07:32:01

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Video download problem for video server

Hmm...these should be already in download.php. And yes you have to change the values depending on which web server you use. Is download working for you now?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2016-12-04 09:20:36

discuss4u
Member
Registered: 2013-03-06
Posts: 163

Re: Video download problem for video server

It works only when NGINX_SECURE_LINK and NGINX are not defined.

The problem is the download link will not be expired in this case. And people can download whenever they got the download link.

Offline

#4 2016-12-04 18:40:12

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Video download problem for video server

If you enable these settings you need to have nginx with secure link configured. Download will however always work as long as the the user has permissions to download the file. This protection is not 100% however.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2016-12-07 03:23:46

discuss4u
Member
Registered: 2013-03-06
Posts: 163

Re: Video download problem for video server

Well, I would just to make it a little bit more secure so I prefer to have NGINX_SECURE_LINK set up.

I have this in my NGINX vhosts conf


 location ~ \.mp4$ {
            secure_link $arg_st,$arg_e;
            secure_link_md5 securec$uri$arg_e$remote_addr;

            if ($secure_link = "") {
                        return 403;
            }

            if ($secure_link = "0") {
                return 403;
            }

            mp4;
            mp4_buffer_size     4m;
            mp4_max_buffer_size 10m;

        }

and I have already set NGINX_SECURE_KEY as "securec"

Is there any other thing I have to take care of in order to make it work

Offline

Board footer

Powered by FluxBB