我有两台服务器。 服务器1是 Tomcat 上带有 Alfresco 4.2 的 Ubuntu 12.04 LTS。 服务器2是 Windows 7,我的 CAS 服务器 (SSO) 安装在 eclipse 上。两者都有 apache,前面有 mod proxy AJP 来协商 SSL。
server1.tld 上的 Alfresco 在 server2.tld 上返回 CAS。但是当我登录时,server1 上的 Alfresco/tomcat 返回异常:
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching server2.tld found
server1上的Vhost:
<VirtualHost *:80>
ServerName server1.tld
Redirect permanent / https://server1.tld/
</VirtualHost>
<VirtualHost *:443>
ServerName server1
ServerAdmin [email protected]
DocumentRoot "/home/user/alfresco-4.2.e/"
CustomLog /var/log/apache2/access.ged.log combined
ErrorLog /var/log/apache2/errors.ged.log
Header Always set Cache-Control "no-cache,no-store"
Header Always set Pragma "no-cache"
Header Always set Expires 0
RewriteEngine On
ProxyPass / ajp://server1.tld:8039/
ProxyPassreverse / ajp://server1.tld:8039/
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/ssl/certs/server1.tld.crt
SSLCertificateKeyFile /etc/ssl/private/server1.tld.pem
SSLCACertificateFile /etc/ssl/certs/ca.crt
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>
server2上的虚拟主机:
<VirtualHost *:80>
ServerName server2.tld
Redirect permanent / https://server2.tld
</VirtualHost>
<VirtualHost *:443>
ServerName server2.tld
ServerAdmin [email protected]
DocumentRoot "C:\Users\user\eclipse\sso-cas\cas.web"
CustomLog logs/access.cas.log combined
ErrorLog logs/errors.cas.log
Header Always set Cache-Control "no-cache,no-store"
Header Always set Pragma "no-cache"
Header Always set Expires 0
RewriteEngine On
ProxyPass / ajp://server2.tld:8029/
ProxyPassreverse / ajp://server2.tld:8029/
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\server2.tld.crt"
SSLCertificateKeyFile "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\server2.tld.pem"
SSLCACertificateFile "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\ca.crt"
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>
如何解决?如果可能的话,不要对 Alfresco 进行任何代码更改。
编辑
也许问题出在 tomcat server.xml 配置上?目前在 tomcat server1 server.xml 上的配置为:
<Connector port="8039" URIEncoding="UTF-8" protocol="AJP/1.3" redirectPort="8473" />
当前在 tomcat server2 server.xml 上的配置:
<Connector port="8029" protocol="AJP/1.3" redirectPort="8443"/>
我没有 ssl 属性,因为我认为 apache 和 tomcat 之间的通信不安全。但是有什么问题吗?