Welcome! Log In Create A New Profile

Advanced

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

February 22, 2011 05:03AM
Thanks for all your replies. Spasibo :)

I have some (strong) requirements like to not modify the application code or to do as few changes in the platform's configuration/architecture as possible. Thus I'm using Igor's example that seemed to me the best choice for migration from Lighttpd to Nginx. I'm trying to make the following configuration works :

Secured link :
http://secure.domain.com/get/24b9cb61c9c2c9070038aceaaf7bae5a/4d63842e/2/H264-384x288/04/85/3120485.h264

*******************************************************
Configuration :

server {
server_name secure.domain.com;
root /var/www;

location /get/ {
location ~ ^/get/([\w\-=]+)/(\w+)(/.+)$ {

root /mnt/medias;

secure_link $1,$2;
secure_link_md5 $3.$2.$mysalt

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

if ($secure_link = "0") { # expired
return 410;
}
}

return 404;

error_page 403 /forbidden.html;
error_page 404 /not_found.html;
error_page 410 =403 /link_expired.html;
}
}

*******************************************************

After trying to access the link I always got this into my error.log :

2011/02/22 10:50:32 [error] 26143#0: *1 open() "/var/www/forbidden.html" failed (2: No such file or directory), client: 192.168.156.11, server: secure.domain.com, request: "GET /get/24b9cb61c9c2c9070038aceaaf7bae5a/4d63842e/2/H264-384x288/04/85/3120485.h264 HTTP/1.1", host: "secure.domain.com"


As far as I understand I got a "403" everytime I'm trying to validate the URL. That means $secure_link is empty and I don't know why... Of course, I'm not using an "epoch Unix time" in the link so I modified it to be able to send a date in this format but I keep having the same error into my log.

It will be (really) better if can keep my actual link format with the expiration time given in hex not in epoch but If there is no other solution, I will change the application's code.

Thanks for your answers.
Regards,

Thomas S
Subject Author Posted

Migrating from Lighttpd : mod_secdownload show-stopper ?

thoseg February 10, 2011 11:16AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

thoseg February 10, 2011 11:25AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

vt February 10, 2011 11:26AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Robert La Ferla February 10, 2011 11:28AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

vt February 10, 2011 11:36AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Epstein June 09, 2011 11:54AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Francis Daly June 09, 2011 03:06PM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

thoseg February 10, 2011 11:50AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

vt February 10, 2011 11:56AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Robert La Ferla February 10, 2011 12:00PM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

vt February 10, 2011 12:36PM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Reinis Rozitis February 10, 2011 01:24PM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Pedro Melo February 11, 2011 04:58AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

thoseg February 22, 2011 05:03AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Francis Daly February 22, 2011 07:24AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Francis Daly February 23, 2011 04:48AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

ntr0py April 13, 2011 03:39AM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Igor Sysoev February 10, 2011 03:08PM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

Igor Sysoev February 10, 2011 03:28PM

Re: Migrating from Lighttpd : mod_secdownload show-stopper ?

António P. P. Almeida February 10, 2011 04:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 57
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready