当请求来自不同的服务器时,mod_secdownload不工作

时间:2012-03-04 18:31:19

标签: php lighttpd

注意:单击test1后将下载110 KB图片。

test1托管@托管文件的服务器(dl5.nat.li)

test2托管@外部服务器,报告“Gone”

为什么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 个答案:

答案 0 :(得分:1)

重启lighttpd后问题消失了,我不知道为什么或者发生了什么......奇怪。

相关问题