【发布时间】:2019-10-30 05:23:34
【问题描述】:
我在 Google Cloud 平台堆栈上使用 bitnami django。
目标:我希望在托管在 Google Cloud 上的 bitnami 堆栈上配置 SSL。但是他们的 toolsudo ./bncert-tool 抱怨“该域解析到的 IP 地址与为这台机器检测到的 IP 地址不同。请修复其 DNS 条目或将其删除。
我使用谷歌域名购买了一个域名。
我已将 google dns 设置为指向我在 bitnami 堆栈中看到的 IP 地址。我在谷歌域名设置中启用了mydomain.com和www.mydomain.com转发到云服务器ipaddress/home
然后我尝试运行工具 /opt/bitnami/bncert-tool:
sudo /opt/bitnami/bncert-tool
Welcome to the Bitnami HTTPS Configuration tool.
Domains
Please provide a valid space-separated list of domains for which you wish to
configure your web server.
Domain list []: mydomain.com
The following domains were not included: www.mydomain.com. Do you want to add them? [Y/n]: n
Warning: No www domains (e.g. www.example.com) or non-www domains (e.g.
www.example.com) have been provided, so the following redirections will be
disabled: non-www to www, www to non-www.
Press [Enter] to continue:
Warning: The domain 'mydomain.com' resolves to a different IP address than the
one detected for this machine, which is 'aa.bb.ccc.dddd'. Please fix its DNS
entries or remove it. For more info see:
https://docs.bitnami.com/general/faq/configuration/configure-custom-domain/
Press [Enter] to continue:
我的问题: 我该如何解决这个问题?我什至尝试添加两个域 mydomain.com www.mydomain.com
我想为 mydomain.com 和 www.mydomain.com 启用 SSL,但不知道哪里出错了?
其次,链接转发后,如何关联我的域名,这样静态IP就不会一直显示,而是显示映射的域mydomain.com/home
谢谢 泡沫
$nslookup mydomain
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
Name: mydomain.com
Address: 216.239.32.21
Name: mydomain.com
Address: 216.239.34.21
Name: mydomain.com
Address: 216.239.36.21
Name: mydomain.com
Address: 216.239.38.21
$ nslookup www.mydomain.com
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
www.mydomain.com canonical name = ghs.googlehosted.com.
Name: ghs.googlehosted.com
Address: 172.217.26.179
$ dig +short NS mydomain.com ns-cloud-b1.googledomains.com.
ns-cloud-b2.googledomains.com. ns-cloud-b3.googledomains.com.
ns-cloud-b4.googledomains.com.
$ dig +short NS www.mydomain.com ghs.googlehosted.com.
【问题讨论】:
-
在您的问题中显示您的 DNS 服务器记录。使用 MxToolbox 等 Internet 工具来测试您的域的记录。这会告诉你什么是错的。注意:对 DNS 服务器的更改需要时间,有时一天才能生效。仔细计划您的更改。详情谷歌搜索 DNS TTL。
-
我查看了 mydomain.com 和 www.mydomain.com 的 DNS 记录。有趣的是我的一个域:mydomain.com 指向多个 IP 地址,而另一个指向不同的 IP,具体取决于 DNS 服务器。我使用whatsmydns.net/#A/mydomain.com 和whatsmydns.net/#A/www.mydomain.com 来获取详细信息。 bitnami 有人说这意味着您正在使用负载均衡器或 CDN),而另一个指向不同的 IP 地址,具体取决于 DNS 服务器。
-
我只是使用谷歌作为域名注册商,如何解决这个 DNS 问题。我所做的只是转发 mydomain.com -> 当我启动在 Google Cloud Platform 上运行的 bitnami django 云实例时获得的静态 IP。我实际上没有启动任何负载均衡器等。
-
显示您的 DNS 服务器记录。这些信息不是秘密。 DNS 服务器记录是公共信息。如果没有,请使用 MxToolbox 来解决。
-
我将通过我为解决此问题而采取的步骤来解决此问题。
标签: ssl google-cloud-platform bitnami