ubuntu – 无效的命令’AuthType’,可能是由服务器配置中未包含的模块拼写错误或定义的

前端之家收集整理的这篇文章主要介绍了ubuntu – 无效的命令’AuthType’,可能是由服务器配置中未包含的模块拼写错误或定义的前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试密码保护文档根目录,我得到的只是一个“内部服务器错误页面. Apache错误日志显示
Invalid command 'AuthType',perhaps misspelled or defined by a module not included in the server configuration

我的.htaccess文件在任何重写条目之前:

AuthType Basic
AuthName "Restricted Access"
AuthBasicProvider file
AuthUserFile /var/www/public/.htpasswd
Require user dean

我检查了模块是否已启用:

Array ( 
    [0] => core 
    [1] => mod_so
    [2] => mod_watchdog 
    [3] => http_core 
    [4] => mod_log_config 
    [5] => mod_logio 
    [6] => mod_version 
    [7] => mod_unixd 
    [8] => mod_access_compat 
    [9] => mod_alias 
    [10] => mod_auth_basic 
    [11] => mod_authn_file 
    [12] => mod_authz_core 
    [13] => mod_authz_groupfile 
    [14] => mod_authz_host 
    [15] => mod_authz_user 
    [16] => mod_autoindex 
    [17] => mod_cgi 
    [18] => mod_dav 
    [19] => mod_dav_fs 
    [20] => mod_deflate 
    [21] => mod_dir 
    [22] => mod_env 
    [23] => mod_filter 
    [24] => mod_mime 
    [25] => mod_negotiation 
    [26] => mod_PHP5 
    [27] => prefork 
    [28] => mod_reqtimeout 
    [29] => mod_rewrite 
    [30] => mod_setenvif 
    [31] => mod_socache_shmcb 
    [32] => mod_ssl 
)

我的Apache版本在Ubuntu 14.04上是2.4.10

似乎AuthType由Apache 2.4中的 mod_authn_core提供.我没有在您提供的列表中看到该模块已加载.
原文链接:https://www.f2er.com/ubuntu/348243.html

猜你在找的Ubuntu相关文章