apache基于ssl配置weblogic(完结篇)
眼睛基本已经无大碍。
今天使用apache连接weblogic,并使用ssl,终于完成,最终选用的方式是前端使用apache来进行ssl处理,weblogic只负责相关的业务处理。
在apache一边,载入mod_ssl.so、mod_rewrite.so和mod_wl.so,注意mod_wl.so的版本,之前就是因为版本不对导致了一些问题。
建立80端口的虚拟主机,在虚拟主机中用rewrite模块进行了https重定向,RewriteCond意思是重定向的条件,RewriteRule是重定向的匹配模式。使用weblogic模块进行连接weblogic的处理
<VirtualHost *:80>DocumentRoot "htdoc"ServerName localhost<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{HTTPS} offRewriteRule /hello\.do https://%{HTTP_HOST}%{REQUEST_URI}</IfModule><IfModule mod_weblogic.c>Include conf/Weblogic.conf</IfModule></VirtualHost> WebLogicHost localhost WebLogicPort 7001SecureProxy ON MatchExpression *.jspMatchExpression *.doMatchExpression *.actionWLLogFile /tmp/wlproxy.log
<IfModule mod_weblogic.c>Include conf/Weblogic.conf</IfModule><IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{HTTPS} onRewriteRule ^(?!.*?/hello\.do).*$ http://%{HTTP_HOST}%{REQUEST_URI}</IfModule>