Apache SSPI 身份验证
Apache SSPI authentication
对于我们的 Intranet,我们希望使用通过 SSPI 对我们的用户进行身份验证的 apache 服务器。
所以,首先是服务器的一些规格:
Windows Server 2008 R2
Apache 2.4(xampp)
日志文件中现在是这个错误:
[Wed Dec 09 11:01:34.987431 2015] [authnz_sspi:error] [pid 3068:tid 1900] (OS 87)Falscher Parameter. : [client ::1:59166] authentication failure for "/": user unknown, reason: cannot generate context
httpd.conf:
LoadModule authnz_sspi_module modules/mod_authnz_sspi.so
<Directory "c:/xampp/htdocs/ebm">
Options None
AllowOverride All
Order allow,deny
Allow from all
AuthName "SSPI Protected Place"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIOfferBasic Off
SSPIOmitDomain Off
Require valid-user
</Directory>
因为我们也在使用虚拟主机,这里是 httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/ebm"
ServerName intranet
ServerAlias intranet
ErrorLog logs/intranet-error_log
TransferLog logs/intranet-access_log
<Location /htdocs/ebm/ >
AuthType SSPI
AuthName "Test Login"
SSPIAuth On
SSPIAuthoritative On
SSPIOfferBasic On
SSPIOmitDomain Off
SSPIBasicPreferred On
</Location>
</VirtualHost>
实际上有时它会正确验证用户身份,但大多数时候我在尝试连接到 Intranet 时收到 401。怎么了?
看来我可以解决它..
我只需要在 apache 配置中禁用 SSL。 (我们不使用它,因为它是本地服务器)
对于我们的 Intranet,我们希望使用通过 SSPI 对我们的用户进行身份验证的 apache 服务器。 所以,首先是服务器的一些规格:
Windows Server 2008 R2
Apache 2.4(xampp)
日志文件中现在是这个错误:
[Wed Dec 09 11:01:34.987431 2015] [authnz_sspi:error] [pid 3068:tid 1900] (OS 87)Falscher Parameter. : [client ::1:59166] authentication failure for "/": user unknown, reason: cannot generate context
httpd.conf:
LoadModule authnz_sspi_module modules/mod_authnz_sspi.so
<Directory "c:/xampp/htdocs/ebm">
Options None
AllowOverride All
Order allow,deny
Allow from all
AuthName "SSPI Protected Place"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIOfferBasic Off
SSPIOmitDomain Off
Require valid-user
</Directory>
因为我们也在使用虚拟主机,这里是 httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/ebm"
ServerName intranet
ServerAlias intranet
ErrorLog logs/intranet-error_log
TransferLog logs/intranet-access_log
<Location /htdocs/ebm/ >
AuthType SSPI
AuthName "Test Login"
SSPIAuth On
SSPIAuthoritative On
SSPIOfferBasic On
SSPIOmitDomain Off
SSPIBasicPreferred On
</Location>
</VirtualHost>
实际上有时它会正确验证用户身份,但大多数时候我在尝试连接到 Intranet 时收到 401。怎么了?
看来我可以解决它.. 我只需要在 apache 配置中禁用 SSL。 (我们不使用它,因为它是本地服务器)