AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 422856
Accepted
Steffen Winkler
Steffen Winkler
Asked: 2012-08-31 04:24:31 +0800 CST2012-08-31 04:24:31 +0800 CST 2012-08-31 04:24:31 +0800 CST

目录指令:AuthType 无但仍需要 AuthProvider?

  • 772

我使用的是 Apache 2.2 而不是 2.4,这解释了标题中的错误。在 Brain99 发表他的评论后,我发现我有 2.2,按照他的建议调整我的配置(仍然没有用),试了一下,睡了一晚,第二天我发现,我忘记了包含启用 mod 的目录的语句!

现在我只需要服务器让我从一个特定的文件夹下载文件(在我的例子中我选择 /opt/myFolder 来完成该任务)

发行版是 Debian 6.0

编辑开始

Apache 版本是 2.4,根据他们的官方文档,Order/Allow 子句已被弃用,不应再使用

我是个白痴:Apache 版本是 2.2。

edit_end 我在 apache2.conf 中的目录指令如下所示:

<IfModule dir_module>
                DirectoryIndex index.html index.htm index.php
</IfModule>
ServerRoot "/etc/apache2"
DocumentRoot "/opt/myFolder"
<Directory />
        Options FollowSymLinks
        AuthType None
        AllowOverride None
        Require all denie
</Directory>
<Directory "/opt/myFolder/*">
        Options FollowSymLinks MultiViews
        AllowOverride None
        AuthType None
        Require all allow
</Directory>

当我尝试访问该文件夹 ( http://myserver.de/aTestFile.zip ) 中的文件时,出现内部服务器错误。Apache 还将以下错误写入其日志:

configuration error:  couldn't check user.  Check your authn provider!: /aTestFile.zip

如果我不需要任何身份验证,为什么还需要身份验证提供程序?我也希望有人可以向我解释我需要什么样的 AuthenticationProvider。每次我搜索这些东西时,都会有人问我如何使用密码保护文件/目录或限制对某些 IP 地址的访问,这对我没有多大帮助。

好的,因为我有 Apache 2.2 版,这是我在使用 Order/Deny/Allow 命令而不是 AuthType/Require 命令时得到的错误:

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration.
apache-2.2
  • 1 1 个回答
  • 19384 Views

1 个回答

  • Voted
  1. Best Answer
    brain99
    2012-08-31T04:42:26+08:002012-08-31T04:42:26+08:00

    我相信这是由于以下错误的配置指令造成的:

    Require all denie
    Require all allow
    

    请尝试以下配置:

    <Directory />
            Options FollowSymLinks
            AuthType None
            AllowOverride None
            Order deny,allow
            Deny from all
    </Directory>
    <Directory "/opt/myFolder/*">
            Options FollowSymLinks MultiViews
            AllowOverride None
            AuthType None
            Order deny,allow
            Allow from all
    </Directory>
    

    编辑 2:您的问题也可能是由于未加载mod_authz_host模块。您可以尝试启用它a2enmod authz_host并重新启动 apache。

    另外,似乎AuthType None是无效的。只需AuthType从您的配置中完全删除该指令即可。

    • 6

相关问题

  • Apache Django Mod_Wsgi - 自动重新加载应用程序

  • Apache:对多个虚拟主机使用相同的目录指令

  • Apache 上的子域不工作 - 找不到服务器

  • PHP 作为 CGI 还是 Apache 模块?

  • 避免将某些丢失的文件记录到 Apache2 错误日志中

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve