DNS设置:使用CloudFlare / rhcloud OpenShift [英] DNS Settings: OpenShift with CloudFlare / rhcloud

查看:323
本文介绍了DNS设置:使用CloudFlare / rhcloud OpenShift的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在CloudFlare上设置DNS转发到我的Openshift页面(the-domain.rhcloud.com)。



但是当我进入CloudFlare DNS设置并尝试更改A设置,我收到此错误:



您输入的是the-domain.rhcloud.com,这不是有效的IP地址。 / p>

似乎是要求一个静态IP地址。似乎其他主机服务可以提供DNS设置的数字IP地址,但是我无法在rhcloud / OpenShift上找到任何类似的东西。



如何找到我的域的ip地址在rhcloud OpenShift?转发到rhcloud主机时,CloudFlare的基本DNS设置应该如何?



我的注册商应该使用任何默认的A和AAAA设置吗?

解决方案

这有点不寻常,但是当使用Openenshift / Heroku等服务时,DNS中没有域名的A记录。这是因为没有与您的网站或应用程序对应的单个记录。



如果您已经设置了域在您的注册商使用Cloudflare的域名服务商(您需要执行此操作),您无需在注册商处执行任何其他操作。



您需要设置一个更多)Cloudlare网站/应用程式的CNAME(如果是网站,可能需要一个例如example.com和www.example.com)。



假设您需要裸体域名和www版本,您可以这样做:



Openshift




  1. 确保您为裸域和www子域设置了域名。



Cloudflare :



备份!




  • Cloudflare可以导出您的DNS设置;



裸体域




  1. 转到DNS设置页面

  2. 从底部的选择器中选择CNAME

  3. 输入 the-domain in the first field

  4. 输入 the-domain.rhcloud.com in第二个(是别名)字段



www subdomain




  1. 重复上述步骤1-4,输入 www 步骤3。

  2. 转到页面规则页面

  3. 添加新的页面转发规则

    • http://the-domain.com/* 重定向到 http://www.the-domain.com/$1

    • 重定向 http://www.the-domain.com/* http://the-domain.com/$1

    • 为重定向类型选择'301'



I am trying to set up DNS forwarding on CloudFlare, to my Openshift page (the-domain.rhcloud.com).

But when I go into the CloudFlare DNS settings and try to change the A setting, I get this error:

You entered 'the-domain.rhcloud.com' which is not a valid IP address.

It seems to be asking for a static ip address. It seems that other hosting services can provide a numerical ip address for DNS settings, but I cannot find anything like that on rhcloud / OpenShift.

How can I find my domain's ip address on rhcloud OpenShift? What should basic DNS settings look like on CloudFlare when forwarding to an rhcloud host?

Should I use any of the default A and AAAA settings from my registrar?

解决方案

It's a bit unusual, but when using services like Openshift/Heroku etc, there is no A record for the domain in your DNS. This is because there is no single A record corresponding to your site or app on the service.

If you've already set up the domain at your registrar using Cloudflare's nameservers (you need to do this!) there should be no need to do anything else at the registrar.

You need to set up one (or more) CNAMEs for the site/app at Cloudlare (if it's a website, you may want one each for e.g. example.com and www.example.com).

Assuming you do need the 'naked' domain and the www version, you'd do this:

Openshift

  1. Make sure you have domains set up for both the 'naked' domain and the www subdomain.

Cloudflare:

Back it up!

  • Cloudflare lets you export your DNS settings; do this before making any changes.

Naked domain

  1. go to the DNS settings page
  2. choose CNAME from the selector at bottom
  3. enter the-domain in the first field
  4. enter the-domain.rhcloud.com in the second ("is an alias of") field

www subdomain

  1. repeat steps 1-4 from above, but enter www for step 3.
  2. go to the "Page Rules" page
  3. add a new "page forwarding" rule that either:
    • redirects http://the-domain.com/* to http://www.the-domain.com/$1 or
    • redirects http://www.the-domain.com/* to http://the-domain.com/$1
    • choose '301' for the redirect type

这篇关于DNS设置:使用CloudFlare / rhcloud OpenShift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆