gpt4 book ai didi

apache - 将子域重定向到外部站点的 CNAME 规则不起作用

转载 作者:行者123 更新时间:2023-12-04 17:39:23 27 4
gpt4 key购买 nike

我在 myDomain.com 上自行托管我的个人网站,这是一个由 apache 提供的 flask 应用程序。我正在使用静态站点生成器和 netlify 创建个人博客,我希望将其托管在 blog.myDomain.com

我在 myDomain 的 DNS 提供商上为 blog 设置了 CNAME 规则,它指向 netlify url customNetlifyDomain.netlify.com 但这似乎不是在职的。 curl -v blog.myDomain.com 返回

* Connected to blog.myDomain.com (ipv6.addr) port 80 (#0)
> GET / HTTP/1.1
> Host: blog.myDomain.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Cache-Control: max-age=30, public
< Content-Length: 9
< Content-Type: text/html; charset=utf-8
< Date: Sat, 16 Mar 2019 19:03:28 GMT
< X-Content-Type-Options: nosniff
< X-Frame-Options: ALLOWALL
< X-Request-Id: xxx
< X-Runtime: 0.007337
< Age: 0
< Connection: keep-alive
< Server: Netlify
< X-NF-Request-ID: xxx
<
* Connection #0 to host blog.myDomain.com left intact
Not Found

我能够 ping blog.myDomain.com 并获得

 ping blog.myDomain.com
PING customNetlifyDomain.netlify.com (ip.addr) 56(84) bytes of data.
64 bytes from 142.93.108.123: icmp_seq=1 ttl=57 time=25.2 ms
64 bytes from 142.93.108.123: icmp_seq=2 ttl=57 time=34.7 ms
2 packets transmitted, 2 received, 0% packet loss, time 1001ms

nslookup blog.myDomain.com:

Server:     127.0.1.1
Address: 127.0.1.1#53

Non-authoritative answer:
blog.myDomain.com canonical name = customNetlifyDomain.netlify.com.
Name: customNetlifyDomain.netlify.com
Address: ip.addr

任何建议表示赞赏!

最佳答案

确保子域别名已添加到 Netlify 站点的域管理中。

enter image description here

关于apache - 将子域重定向到外部站点的 CNAME 规则不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55200527/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com