apache weblogic ssl linux,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的处理

DocumentRoot "htdoc"

ServerName localhost

RewriteEngine on

RewriteCond %{HTTPS} off

RewriteRule /hello\.do https://%{HTTP_HOST}%{REQUEST_URI}

Include conf/Weblogic.conf

Weblogic.cnf主要内容是

WebLogicHost localhost

WebLogicPort 7001

SecureProxy ON

MatchExpression *.jsp

MatchExpression *.do

MatchExpression *.action

WLLogFile /tmp/wlproxy.log

打开对httpd-ssl.conf的引用,并修改httpd-ssl.conf

在443端口的虚拟主机中加入:

Include conf/Weblogic.conf

RewriteEngine on

RewriteCond %{HTTPS} on

RewriteRule ^(?!.*?/hello\.do).*$ http://%{HTTP_HOST}%{REQUEST_URI}

注意从https跳回http的重定向中的正则表达式代表不是hello.do的链接都跳回http。

将SSLCertificateFile和SSLCertificateKeyFile的地址打开,这两个地址指向生成的证书地址和生成的私钥地址。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值