apache下htaccess的Invalid command 'AuthUserFile'错误

使用了apache的 .htaccess做身份认证后, 无法访问
查看日志报错如下:
"Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration"

google 一下, 在apache配置文件里加入如下配置

LoadModule auth_basic_module /usr/lib/apache2/modules/mod_auth_basic.so
LoadModule authz_owner_module /usr/lib/apache2/modules/mod_authz_owner.so
LoadModule authn_file_module  /usr/lib/apache2/modules/mod_authn_file.so

ok,问题解决

Tags: apache, htaccess, 身份验证

相关日志

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

还没有评论。

发表评论

(必填)

(必填)


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comment moderation is enabled. Your comment may take some time to appear.