【问题标题】:mod_secdownload not working when request comes from different server当请求来自不同的服务器时,mod_secdownload 不起作用
【发布时间】:2012-03-04 18:31:18
【问题描述】:

注意:点击test1会下载110KB的图片。

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

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

为什么 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

我在这里不知所措。

【问题讨论】:

    标签: php lighttpd


    【解决方案1】:

    重新启动 lig​​httpd 后问题消失了,我不知道为什么或发生了什么……奇怪。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-06
      • 1970-01-01
      • 2010-10-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-16
      相关资源
      最近更新 更多