【问题标题】:Github user page and project page in different subdomains of the same domain?Github用户页面和项目页面在同一个域的不同子域?
【发布时间】:2022-06-16 12:19:38
【问题描述】:

所以我想要完成的是:

  1. UserName/username.github.io 服务于https://subdomain.domain.com
  2. Username/project 服务于https://project.domain.com

我做过这些事情:

  1. 在 cpanel 中添加 DNS 记录:subdomain CNAME username.github.io.
  2. 将 CNAME 文件 subdomain.domain.com 放入 UserName/username.github.io 存储库中。
  3. 将 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


    【解决方案1】:

    尝试添加另一个 DNS CNAME 记录:project CNAME username.github.io.

    它应该可以工作。

    【讨论】:

      猜你喜欢
      • 2017-03-20
      • 2019-04-26
      • 2014-04-14
      • 1970-01-01
      • 2020-04-30
      • 1970-01-01
      • 2012-02-23
      • 2013-05-11
      • 2015-10-22
      相关资源
      最近更新 更多