我正在尝试为我们的网站之一实施SSL。网站使用Apache2.2作为web服务器,然后通过AJP协议与Tomcat7通信。
我已经从Verisign购买了证书。此外,我还能够在apache web服务器上安装相同的程序。来告诉您我已经完成了哪些配置
httpd.conf
Listen 82
LoadModule ssl_module libexec/mod_ssl.so
Include etc/extra/httpd-ssl.conf
Include etc/extra/httpd-vhosts.conf
httpd-ssl.conf
Listen 443
<VirtualHost _default_:443>
ServerName test.domain.com:443
ServerAdmin root@test.domain.com
SSLEngine on
SSLCertificateFile /opt/csw/ssl/test.crt
SSLCertificateKeyFile /opt/csw/ssl/test.key
SSLCertificateChainFile /opt/csw/ssl/test.crt
<Virtual Host>
httpd-vhosts.conf
NameVirtualHost *:82
NameVirtualHost *:443
Include etc/vhosts/test.conf
test.conf
<VirtualHost *:82 *:443>
ServerName test.domain.com
RewriteEngine On
RewriteRule ^/(test/registration.cfm) /test/$1 [P,L]
RewriteRule ^/(index.cfm) / [P]
ProxyRequests Off
<Proxy balancer://testBal>
BalancerMember ajp://<tomcat_server>:8009/test
BalancerMember ajp://<tomcat_server2>:8009/test status=+h
</Proxy>
ProxyPass /test/admin/ !
ProxyPass /test/ balancer://testBal/
ProxyPass / balancer://testBal/
</VirtualHost>
好的。现在的问题是,每当我点击url https://test.domain.com时,我就会得到空白页面。然而,我看到该网站正在被认可为认证,我也可以查看证书。我在apache访问日志-- "GET Tomcat HTTP/1.1“404 209”和错误日志--“文件不存在:/opt/csw/apache2/share/htdocs/folicon.ico”中看到的。Tomcat服务器是在8080端口上运行的。在过去的几天里,我一直在为这个问题而努力,但都无济于事。感谢您的建议和帮助!谢谢!
发布于 2013-02-22 11:55:57
好的。所以我想我已经修复了所做的this.below更改。
http-ssl.conf
Listen 443
<VirtualHost *:443>
#ServerName test.domain.com:443
ServerAdmin root@test.domain.com
SSLEngine on
SSLCertificateFile /opt/csw/ssl/test.crt
SSLCertificateKeyFile /opt/csw/ssl/test.key
SSLCertificateChainFile /opt/csw/ssl/test.crt
<Virtual Host>
不知何故,我想到了服务器名称是在test.conf中定义的,所以在http-ssl.conf中进行了注释,它就像一个护身符。该网站还监听http和https协议。强制使用https protocol..below可以进行更改..我不能测试这一点,但我认为它应该work..if任何人有requirement..for我它是没有必要的..
test.conf
<VirtualHost *:82 *:443>
ServerName test.domain.com
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteRule ^/(test/registration.cfm) /test/$1 [P,L]
RewriteRule ^/(index.cfm) / [P]
ProxyRequests Off
<Proxy balancer://testBal>
BalancerMember ajp://<tomcat_server>:8009/test
BalancerMember ajp://<tomcat_server2>:8009/test status=+h
</Proxy>
ProxyPass /test/admin/ !
ProxyPass /test/ balancer://testBal/
ProxyPass / balancer://testBal/
</VirtualHost>
谢谢!
https://stackoverflow.com/questions/15005725
复制相似问题