简体   繁体   English

Apache层问题将https转换为http

[英]Apache layer issue converting https to http

I have Apache 2.2 load balancer installed and Weblogic 12c server installed. 我已经安装了Apache 2.2负载平衡器和Weblogic 12c服务器。

I have observed that a https URL was attempting to open a http URL in my application which was unsuccessful, as expected. 我观察到一个https URL试图在我的应用程序中打开一个http URL,但未如预期的那样成功。 I searched why this could have caused the problem and noticed something here - 我搜索了这可能导致问题的原因,并注意到了这里的一些内容-

http://geekexplains.blogspot.in/2008/06/https-becoming-http-in-case-of.html http://geekexplains.blogspot.in/2008/06/https-becoming-http-in-case-of.html

When I tried to look for a fix, I found the following links - 当我尝试查找修复程序时,我发现了以下链接-

Fix in Apache layer 修复Apache层

and

Fix in Java layer 修复Java层

I am not keen on making fix in Java layer (or I would rather keep that as my last option), So I tried the fix suggested in the Apache layer, but didn't work (mod_jk.so was not available in my httpd.conf file though) 我不希望在Java层中进行修复(或者我宁愿将其作为最后一个选择),因此我尝试了在Apache层中建议的修复,但是没有起作用(mod_jk.so在我的httpd中不可用)。 conf文件)

Any suggestions that can be provided will be very helpful. 可以提供的任何建议将非常有帮助。

At the Apache layer you could do a simple: 在Apache层,您可以执行以下操作:

<VirtualHost *:80>
    ServerName www.hostname.tld
    Redirect permanent / https://www.hostname.tld/
</VirtualHost>

To redirect any request for http to https. 将对http的任何请求重定向到https。 This assumes that the client software can handle redirects. 这假定客户端软件可以处理重定向。 Browsers are great at it. 浏览器非常出色。 Homegrown HTTP clients may or may not be. 本地HTTP客户端可能是也可能不是。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM