Apache 2.4 - mod_ratelimit打破了mod_autoindex

问题描述 投票:0回答:1

我正在尝试使用mod_ratelimit在我的整个apache服务器上启用带宽限制。

如果我将以下内容添加到我的apache2.conf:

SetOutputFilter RATE_LIMIT
SetEnv rate-limit 1024
SetEnv rate-initial-burst 1024

我的索引停止工作了。我正在使用fancy-index,并将其.htaccess的内容复制到我的mods-enabled/autoindex.conf

我访问索引时服务器返回的html是

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
  <link rel="stylesheet" type="text/css" href="/fancy-index/style.css">
</head>
<body>

如果我改为将这些速率限制行添加到<Directory>指令中,则索引是固定的,并且速率限制适用于该文件夹。但是,我正在尝试使用它来限制Nextcloud下载,并且将限制应用于该虚拟主机或根目录似乎根本不起作用,因此我希望将速率限制应用于整个服务器。

apache httpd.conf
1个回答
0
投票

这显然是一个众所周知的问题:https://bz.apache.org/bugzilla/show_bug.cgi?id=62568

© www.soinside.com 2019 - 2024. All rights reserved.