htpasswd问题:AuthType采用一个参数,即HTTP授权类型(例如“ Basic”)]]

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

我之前从未遇到过此错误,并且在Google上进行的搜索并没有太多。我收到500内部服务器错误。运行Ubuntu 18.04。

Apache日志:

AuthType takes one argument, an HTTP authorization 
type (e.g., "Basic")

。htaccess

AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user

/ etc / apache2 / .htpasswd

test:$apr1$iAZiDJQI$kx5QMVpowee3IG7eCf24X1

我曾尝试将.htpasswd移至文档根目录,更改权限,将所有者设置为www-data,但没有任何效果。 AuthUserFile路径绝对正确。

我之前从未遇到过此错误,并且在Google上进行的搜索并没有太多。我收到500内部服务器错误。运行Ubuntu 18.04。 Apache日志:AuthType接受一个参数,即HTTP ...

apache .htaccess ubuntu-18.04 .htpasswd
1个回答
0
投票

有点晚,但是我的.htaccess文件出现相同的错误,该帖子出现在Google的第一个结果中。

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