Apache 模块 mpm-itk 和 authnz_external

Apache 模块 mpm-itk 和 authnz_external

我想在一个 VirtualHost 中使用 authnz_external 模块供系统用户使用,并使用 mpm-itk 模块供另一个用户运行。我的 VirtualHost 配置文件如下所示:

<VirtualHost *:8081>
AddExternalAuth pwauth /usr/bin/pwauth
SetExternalAuthMethod pwauth pipe

<IfModule mpm_itk_module>
AssignUserId user1 apache
</IfModule>

<Directory /var/www/user1_folder/>
AuthType Basic
AuthUserFile /var/www/user1_folder/apache.users
AuthName "private area"
AuthBasicProvider external
AuthExternal pwauth
require valid-user
</Directory>
</VirtualHost>

但是如果我使用此配置,我将无法登录网络。Apache error_log 文件中的内容如下:

[Wed Jun 14 15:43:04.449652 2017] [unixd:alert] [pid 17150] (1)Operation not permitted: AH02156: setgid: unable to set group id to Group 0
[Wed Jun 14 15:43:12.027069 2017] [authnz_external:error] [pid 17149] [client 83.158.44.101:59772] AuthExtern pwauth [/usr/bin/pwauth]: Failed (1) for user user1
[Wed Jun 14 15:43:12.027108 2017] [auth_basic:error] [pid 17149] [client 83.158.44.101:59772] AH01617: user user1: authentication failure for "/user1_folder": Password Mismatch

如果我禁用 mpm-itk 模块或 authnz_external 模块,一切都可以正常工作。

CentOS 7.3、httpd 2.4.6、mod_authnz_external 3.3.1、pwauth 2.3.10、httpd-itk 2.4.7.04

相关内容