【发布时间】:2022-06-16 12:19:38
【问题描述】:
所以我想要完成的是:
- 让
UserName/username.github.io服务于https://subdomain.domain.com - 让
Username/project服务于https://project.domain.com
我做过这些事情:
- 在 cpanel 中添加 DNS 记录:
subdomain CNAME username.github.io. - 将 CNAME 文件
subdomain.domain.com放入 UserName/username.github.io 存储库中。 - 将 CNAME 文件
project.domain.com放入用户名/项目存储库中。
现在 1 号有效:https://subdomain.domain.com 可以访问并正确提供内容。
但是 2 不起作用:DNS 检查失败:
Your site's DNS settings are using a custom subdomain, project.domain.com, that's set up as an A record.
We recommend you change this to a CNAME record pointing at [YOUR USERNAME].github.io.
For more information, see Learn more (InvalidARecordError).
We recommend you change this to a CNAME record pointing to subdomain.domain.com.
现在,如果我遵循建议,那么我会正确地在 subdomain.domain.com/project 得到 UserName/project,但这不是我想要的。
我关注了this question,其中这个应该是重复的……但我想有一些不同的东西,或者我错过了一些东西。
我该如何解决这个问题?
【问题讨论】:
标签: dns subdomain github-pages cname