# Migrate from lighthttp: mod\_secdownload and mod\_magnet

**URL:** <https://www.ruby-forum.com/t/migrate-from-lighthttp-mod-secdownload-and-mod-magnet/189150>\
**Category:** NGINX\
**Created:** [May 25, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/migrate-from-lighthttp-mod-secdownload-and-mod-magnet/189150 "2010-05-25T16:25:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kfkfkf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/74df32/32.png) [@kfkfkf](https://www.ruby-forum.com/u/kfkfkf)\
**Post date:** [May 25, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/migrate-from-lighthttp-mod-secdownload-and-mod-magnet/189150/1 "2010-05-25T16:25:53Z")

</div>

Hi,

I am looking for a replacement for lighthttp and am considering nginx.

For a successfull migration I will need replacements for:

1. Lighthttps mod\_secdownload. -does anyone know of an nginx  
replacement that will provide links with a built in expire time?

2. I also need to dynamically manipulate the Content-Disposition  
header as follows: a HTTP-GET to  
“http:///file.mp3?filename=newfilename.mp3” will return the  
http:///file.mp3 with the “Content-Disposition” header set to  
“attachment; filename=newfilename.mp3”. -in lighthttp I use a mod\_magnet  
script, any thoughts on how best to acheive this effect in nginx?

/thanks

Posted at Nginx Forum:

> **[migrate from lighthttp: mod\_secdownload and mod\_magnet](https://forum.nginx.org/read.php?2,90037,90037#msg-90037)**
>
> Hi, I am looking for a replacement for lighthttp and am considering nginx. For a successfull migration I will need replacements for: 1) Lighthttps mod\_secdownload. -does anyone know of an nginx replacement that will provide links with a built in...

---

<div class="post-metadata">

**Author:** ![kfkfkf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/74df32/32.png) [@kfkfkf](https://www.ruby-forum.com/u/kfkfkf)\
**Post date:** [May 26, 2010, 8:32am UTC](https://www.ruby-forum.com/t/migrate-from-lighthttp-mod-secdownload-and-mod-magnet/189150/2 "2010-05-26T08:32:19Z")

</div>

On Tue, May 25, 2010 at 10:24 PM, kf [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. I also need to dynamically manipulate the Content-Disposition header as follows: a HTTP-GET to “http:///file.mp3?filename=newfilename.mp3” will return the http:///file.mp3 with the “Content-Disposition” header set to “attachment; filename=newfilename.mp3”. -in lighthttp I use a mod\_magnet script, any thoughts on how best to acheive this effect in nginx?

Try out the ngx\_rewrite and ngx\_headers modules?

There’s also a ngx\_lua module that can give your more “dynamics”, but  
atm not as powerful as lighttpd’s mod\_magnet but we’re working on it.

Cheers,  
-agentzh
