问题描述
我有一个简单的PHP齿轮设立OpenShift。我拥有了一切工作顺利,直到我添加了一个自定义的别名,我自己的域名。我对自由选择,并没有配置SSL证书的能力,我不想,这个网站是非常简单的。
I have a simple PHP gear set up on OpenShift. I had everything working well until I added a custom alias for my own domain. I am on the free option and don't have the ability to configure an SSL certificate, and I don't want to, this site is very simple.
这是我得到的问题是,它迫使我的ALIS到 HTTPS
即使我没有设置这件事。我也还没有配置任何Apache重写强制SSL。
The problem that I get is that its forcing my alis to https
even though I have not set that up. I also haven't configured any apache rewrites to force ssl.
有关我的DNS设置,我只是指出了www CNAME到我的装备,因为他们解释,我还没有在DNS中做了什么让强制SSL。
For my DNS settings I am just pointing the www cname to my gear as they explained, I have not done anything in the DNS so force ssl.
根据这个曾经有过类似的错误:
According to this there was a similar bug:Prevent https on Openshift
它说,特别是问题得到解决(这是一年前),但我仍然得到这一点。
It says that particular problem was resolved (that was a year ago) but I am still getting this.
下面是我的网址,所以你可以看到它是做什么:
Here is my URL so you can see what it is doing:www.libertypuppies.us
当你去那里就会迫使你 HTTPS
,并警告你该证书不被信任。
When you go there it will force you to https
and warn you that the certificate is not trusted.
这是一个PHP的齿轮。我没有其他的齿轮,只是一个。
This is on a php gear. I have no other gears, just the one.
我如何配置它不强制SSL和仅仅停留在 HTTP
?
How do I configure it to not force SSL and just stay on http
?
编辑(详细信息):
我试过在.htaccess以下,但没有奏效。无论是我写的改写错误或问题是上涨:
I tried the following in .htaccess but it didn't work. Either I wrote the rewrite wrong or the problem is higher up:
RewriteEngine on
RewriteCond %{HTTPS:X-Forwarded-Proto} !http
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
我也试过:
RewriteEngine on
RewriteCond %{HTTPS} off
和这样的:
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
这都不奏效。如果当你去它也增加了 /应用程序
来的路径网站公告。
推荐答案
必须已使用OpenShift内部的东西。我删除了别名,再次做到了。现在,它的工作原理。
Must have been something internal with OpenShift. I deleted the alias and made it again. Now it works.
这篇关于不要强迫SSL上OpenShift装备吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!