2012-03-04 30 views
1

注意:單擊test1後將會下載110 KB圖片。當請求來自不同服務器時,mod_secdownload無法正常工作

test1託管@託管

test2託管@外部服務器上的文件(dl5.nat.li)相同的服務器,報告 「飄」

爲什麼test1的工作,但test2的不?

他們都有着完全相同的的index.php

<?php 
    $secret = "mysecret"; 
    $uri_prefix = "/dl/"; 
    $f = "/4615c7b8822f5a1187246e83ff3023698c70077a/badresults-ziggo.png"; 
    $t = time(); 
    $t_hex = sprintf("%08x", $t); 
    $m = md5($secret.$f.$t_hex); 
    $url = 'http://dl5.nat.li'.$uri_prefix.$m.'/'.$t_hex.$f; 
    header('Content-Type: application/force-download'); 
    header('Location: '.$url) ; 
?> 

在文件服務器上配置Secdownload:

secdownload.secret   = "mysecret" 
    secdownload.document-root = "/home/dlfolder/" 
    secdownload.uri-prefix  = "/dl/" 
    secdownload.timeout   = 30 

我不知所措就在這裏。

回答

1

重新啓動lighttpd後問題消失了,我不知道爲什麼或發生了什麼......奇怪。