我已经在我的 WAS 7.0 中安装了 SSL 证书,并指向 httd.conf 文件下的 IBM Http Server。我也实现了以下重写机制。但是对于特定的上下文根应用程序,仍然无法从 http 请求重定向到 https。
请给我建议。
在 httpd.conf 文件下实现以下行。
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
<IfModule mod_ibm_ssl.c>
Listen 443
<VirtualHost *:443>
SSLEnable
SSLProtocolDisable SSLv2
ErrorLog logs/error_log
CustomLog logs/access_log common
RewriteEngine On
RewriteOptions Inherit
</VirtualHost>
</IfModule>
KeyFile "/IBM/HTTPServer/testSSL/testkey.kdb"
SSLStashFile "/IBM/HTTPServer/testSSL/testkey.sth"
RewriteEngine on
RewriteRule ^/testPOC/(.*)$ https://localhost/testPOC/$1