我有一个通过Apache服务器前端的开发环境。 这个apache服务器需要启用SSL和启用Centrify的NTLM身份validation/授权与AD后端,使用组访问来查看网页。 将有多个项目使用这个环境,所以我想设置虚拟主机,这将允许每个项目修改自己的虚拟主机与任何特定的Apache模块。 网页文件将存在于/ var / www / project1; / var / www / project2; 等等..
我已经正确configuration了DNS,将* .domain指向apache服务器,还有一个通配符SSL证书,其altDNSName字段设置为* .domain。
问题是NTLM身份validation片:
如果我将浏览器指向https://hostname.fqdn/project1/index.html ,则NTLM授权完全按照我的要求处理。 我相信这跑掉了我的默认虚拟主机。
如果我将浏览器指向https://project1.domain/index.html ,则Apache错误日志会抱怨:“用户对/index.html的NTLMvalidation失败。错误:login失败。
<VirtualHost ipaddress:443> Servername "hostname.fqdn" DocumentRoot "/var/www/" SSLEngine on SSLCertificateFile /path/to/cert.crt SSLCertificateKeyFile /path/to/cert.key </VirtualHost> <VirtualHost ipaddress:443> ServerName "project1.domain" DocumentRoot "/var/www/project1" SSLEngine on SSLCertificateFile /path/to/cert.crt SSLCertificateKeyFile /path/to/cert.key </VirtualHost> <Directory "/var/www"> Options Indexes FollowSymLinks SSLRequireSSL AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/var/www/project1"> AuthType CENTRIFYDC EnableBasicAuth false EnableKerberosAuth false EnableNtlmAuth true Require group required_ad_group </Directory>
我试图用IE和Firefox,确保* .domain是在我的IE本地Intranet区域,并且network.automatic-ntlm-auth.trusted-uris和network.negotiate-auth.trusted-uris的设置是正确的在Firefox中设置。
我已经缩小到NTLM问题,因为如果我删除了Centrify指令,基于名称的虚拟主机就像我所期望的那样工作。 我已经尝试将Directory标签放置在每个虚拟主机中,我也尝试使用Location标签,但是我还没有取得任何进展。
我将首先制作两个完全独立的虚拟主机,按预期工作,然后逐步改变为混合types。
我怀疑你的2 VirtualHosts解决这样的事情;
<VirtualHost ipaddress:443> Servername "hostname.fqdn" DocumentRoot "/var/www/" SSLEngine on SSLCertificateFile /path/to/cert.crt SSLCertificateKeyFile /path/to/cert.key <Directory "/var/www"> Options Indexes FollowSymLinks SSLRequireSSL AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/var/www/project1"> AuthType CENTRIFYDC EnableBasicAuth false EnableKerberosAuth false EnableNtlmAuth true Require group required_ad_group </Directory> </VirtualHost> <VirtualHost ipaddress:443> ServerName "project1.domain" DocumentRoot "/var/www/project1" SSLEngine on SSLCertificateFile /path/to/cert.crt SSLCertificateKeyFile /path/to/cert.key <Directory "/var/www/project1"> AuthType CENTRIFYDC EnableBasicAuth false EnableKerberosAuth false EnableNtlmAuth true Require group required_ad_group </Directory> </VirtualHost>
所以我会testing类似的东西,然后将它们移出每个其他的子目录,看看哪些指令是冲突的
经过更多的调查,这不是Apacheconfiguration的问题。 似乎浏览器正在通过NTLM,Apache正在接收它,但Centrify没有正确validation它。 现在我需要找出故障在哪里,但这是另一个线索。