简体   繁体   English

如何更改 OpenShift Jenkins 以使用 HTTP 而不是 HTTPS

[英]How to change OpenShift Jenkins to use HTTP instead of HTTPs

I create an application Jenkins on Openshift, but when I tried to visit http://[app_name]-[domain_name].rhcloud.com/ , it will be redirected to https://[app_name]-[domain_name].rhcloud.com/ .我在 Openshift 上创建了一个应用程序 Jenkins,但是当我尝试访问http://[app_name]-[domain_name].rhcloud.com/ 时,它将被重定向到https://[app_name]-[domain_name].rhcloud。 com/

I curl the http address, the result is :我卷曲了http地址,结果是:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://[app_name]-[domain_name].rhcloud.com/">here</a>.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at [app_name]-[domain_name].rhcloud.com Port 80</address>
</body></html>

If I do not want to be redirected to https, what should I do?如果我不想被重定向到 https,我应该怎么做? I searched in my openshift folders, but cannot find any helpful things我在我的 openshift 文件夹中搜索,但找不到任何有用的东西

您应该在.htaccess文件中更改它。

RewriteRule ^https://[app_name]-[domain_name].rhcloud.com/(.*)  http://[app_name]-[domain_name].rhcloud.com/$1 [R=301,NC]

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

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