# Nginx-0.7.18

**URL:** <https://www.ruby-forum.com/t/nginx-0-7-18/150805>\
**Category:** NGINX\
**Created:** [October 13, 2008, 3:34pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805 "2008-10-13T15:34:28Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 14, 2008, 3:19pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/21 "2008-10-14T15:19:33Z")

</div>

I think the $secure\_link is not right.  
when change

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

```

to

```
            if ($secure_link = "") {
                          return 500;
           }

```

then the error is always 500 error.  
Thus we can say the $secure\_link=“”?

2008/10/14 lhmwzy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 14, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/22 "2008-10-14T13:47:55Z")

</div>

Yes,I put a index.html file in dl directory.

2008/10/14 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 15, 2008, 2:08am UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/23 "2008-10-15T02:08:00Z")

</div>

Any body try “ngx\_http\_secure\_link\_module” and successful?  
Please give me a hint.

2008/10/14 lhmwzy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 15, 2008, 3:32pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/24 "2008-10-15T15:32:18Z")

</div>

Still can not configure “ngx\_http\_secure\_link\_module” successfully…

2008/10/15 lhmwzy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/25 "2008-10-21T14:43:40Z")

</div>

On Wed, Oct 15, 2008 at 09:21:55PM +0800, lhmwzy wrote:

> Still can not configure “ngx\_http\_secure\_link\_module” successfully…

The module did not work if link was less than 3 symbols (“dl”).  
The attached patch should fix the bug.

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 3:07pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/26 "2008-10-21T15:07:14Z")

</div>

OK.  
The dir structure is:  
wwwroot/dll/dl/index.html

the www root is wwwroot.  
I put the following to nginx.conf

server {

…  
location /dll/  
{  
secure\_link\_secret some;

```
         if ($secure_link = "") {
             return 500;
       }
    }

```

…  
}

Then I request through  
[http://host/dll/cb691d768d21d59719ef7ed3b2ecaf4e/dl](http://host/dll/cb691d768d21d59719ef7ed3b2ecaf4e/dl)  
Also get a 500 error page.

md5(somedl)=cb691d768d21d59719ef7ed3b2ecaf4e

2008/10/21 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/27 "2008-10-21T15:20:09Z")

</div>

YES.I have tried the patch through.  
But I think there must be something wrong.  
Here is my configure:

./configure --user=www --group=www --prefix=/usr/local/nginx  
–with-http\_stub\_status\_module --with-http\_ssl\_module --with-md5=/usr  
–with-http\_gzip\_static\_module --with-http\_realip\_module  
–with-poll\_module --with-http\_secure\_link\_module

2008/10/21 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 3:40pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/28 "2008-10-21T15:40:08Z")

</div>

On Tue, Oct 21, 2008 at 09:11:44PM +0800, lhmwzy wrote:

> YES.I have tried the patch through.  
> But I think there must be something wrong.  
> Here is my configure:
> 
> ./configure --user=www --group=www --prefix=/usr/local/nginx  
> –with-http\_stub\_status\_module --with-http\_ssl\_module --with-md5=/usr  
> –with-http\_gzip\_static\_module --with-http\_realip\_module  
> –with-poll\_module --with-http\_secure\_link\_module

Have you tried

/dll/3373757a24a035b9d157d97468401a19/dl/index.html

?

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/29 "2008-10-21T15:13:08Z")

</div>

On Tue, Oct 21, 2008 at 08:58:57PM +0800, lhmwzy wrote:

> ```
> location /dll/
> 
> ```
> 
> Then I request through  
> [http://host/dll/cb691d768d21d59719ef7ed3b2ecaf4e/dl](http://host/dll/cb691d768d21d59719ef7ed3b2ecaf4e/dl)  
> Also get a 500 error page.
> 
> md5(somedl)=cb691d768d21d59719ef7ed3b2ecaf4e

Have you tried the attached patch ?

BTW, /dll/3373757a24a035b9d157d97468401a19/dl/index.html  
should work without patch.

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/30 "2008-10-21T15:46:03Z")

</div>

I tried:

/dll/3373757a24a035b9d157d97468401a19/dl/index.html

also get a 500 error page.

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/31 "2008-10-21T16:08:58Z")

</div>

Also a 500 error page.

2008/10/21 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/32 "2008-10-21T16:01:21Z")

</div>

On Tue, Oct 21, 2008 at 08:58:57PM +0800, lhmwzy wrote:

> ```
> location /dll/
> 
> ```
> 
> Then I request through  
> [http://host/dll/cb691d768d21d59719ef7ed3b2ecaf4e/dl](http://host/dll/cb691d768d21d59719ef7ed3b2ecaf4e/dl)  
> Also get a 500 error page.
> 
> md5(somedl)=cb691d768d21d59719ef7ed3b2ecaf4e

You should use  
md5(dlsome) = 1f5239a316bd9ee50d2bce5cfa011ed0

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/33 "2008-10-21T16:13:43Z")

</div>

Here is my page:  
[http://www.dydoor.net/dll/1f5239a316bd9ee50d2bce5cfa011ed0/index.html](http://www.dydoor.net/dll/1f5239a316bd9ee50d2bce5cfa011ed0/index.html)

2008/10/21 lhmwzy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/34 "2008-10-21T16:14:18Z")

</div>

Sorry,the page should be

[http://www.dydoor.net/dll/1f5239a316bd9ee50d2bce5cfa011ed0/dl/index.html](http://www.dydoor.net/dll/1f5239a316bd9ee50d2bce5cfa011ed0/dl/index.html)

2008/10/21 lhmwzy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:12pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/35 "2008-10-21T16:12:33Z")

</div>

On Tue, Oct 21, 2008 at 10:01:48PM +0800, lhmwzy wrote:

> Also a 500 error page.

/dll/d66423000cfdc233b5517b582babb46e/dl/index.html

?

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/36 "2008-10-21T16:19:39Z")

</div>

/dll/d66423000cfdc233b5517b582babb46e/dl/index.html  
get a 404 error.

/dll/d66423000cfdc233b5517b582babb46e/dl/  
get a 500 error.

I’m sure there is a file named index.html in dll/dl/.

2008/10/21 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/37 "2008-10-21T16:23:51Z")

</div>

On Tue, Oct 21, 2008 at 10:12:59PM +0800, lhmwzy wrote:

> /dll/d66423000cfdc233b5517b582babb46e/dl/index.html  
> get a 404 error.
> 
> /dll/d66423000cfdc233b5517b582babb46e/dl/  
> get a 500 error.
> 
> I’m sure there is a file named index.html in dll/dl/.

What is in error\_log ?

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/38 "2008-10-21T16:17:52Z")

</div>

On Tue, Oct 21, 2008 at 10:08:32PM +0800, lhmwzy wrote:

> Sorry,the page should be
> 
> [http://www.dydoor.net/dll/1f5239a316bd9ee50d2bce5cfa011ed0/dl/index.html](http://www.dydoor.net/dll/1f5239a316bd9ee50d2bce5cfa011ed0/dl/index.html)

No, page should be

[http://www.dydoor.net/dll/d66423000cfdc233b5517b582babb46e/dl/index.html](http://www.dydoor.net/dll/d66423000cfdc233b5517b582babb46e/dl/index.html)

as MD5 (“dl/index.htmlsome”) = d66423000cfdc233b5517b582babb46e

and it seems to work (404).

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/39 "2008-10-21T16:23:51Z")

</div>

On Tue, Oct 21, 2008 at 10:12:59PM +0800, lhmwzy wrote:

> /dll/d66423000cfdc233b5517b582babb46e/dl/index.html  
> get a 404 error.
> 
> /dll/d66423000cfdc233b5517b582babb46e/dl/  
> get a 500 error.
> 
> I’m sure there is a file named index.html in dll/dl/.

Probably you missed

```
 rewrite ^ /$secure_link break;

```

---

<div class="post-metadata">

**Author:** ![imixaly4](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3ab097/32.png) [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Post date:** [October 21, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/nginx-0-7-18/150805/40 "2008-10-21T16:26:15Z")

</div>

But it should display the content of index.html,not a 404 page.  
So we should use a hash like md5(link/file, secret),not md5(link,  
secret)?

2008/10/21 Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

[Previous page](https://www.ruby-forum.com/t/nginx-0-7-18/150805.md?page=1)

[Next page](https://www.ruby-forum.com/t/nginx-0-7-18/150805.md?page=3)
