Ubuntu 16.04 上的 Apache/2.4.18 - 无效命令‘AuthName’

Ubuntu 16.04 上的 Apache/2.4.18 - 无效命令‘AuthName’

我正在运行 Ubuntu 16.04。

Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial

我正在运行的 Apache HTTP 版本是 2.4.18。

Server version: Apache/2.4.18 (Ubuntu)
Server built:   2016-07-14T12:32:26

以下是加载到 Web 服务器中的模块:

Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
mpm_prefork_module (shared)
authz_core_module (shared)
authz_user_module (shared)
authz_host_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
include_module (shared)
env_module (shared)
ext_filter_module (shared)
mime_magic_module (shared)
expires_module (shared)
headers_module (shared)
usertrack_module (shared)
setenvif_module (shared)
mime_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
actions_module (shared)
alias_module (shared)
rewrite_module (shared)
info_module (shared)
status_module (shared)

我已经加载了提供authn_core下面将要描述的功能的模块:

a2enmod authn_core
Module authn_core already enabled

但是,返回了以下错误:

Invalid command 'AuthName', perhaps misspelled or defined by a module not included in the server configuration

AuthName对于与身份验证相关的指令,也会返回相同的错误。

我做错了什么?如何修复?在 Apache HTTP 2.4 中,这个身份验证功能是否已弃用或以不同的方式实现?

相关内容