Github页面项目的网站子域 [英] Subdomain of website for Github pages project

查看:91
本文介绍了Github页面项目的网站子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Github项目github.com/jeti/matrix,我为该项目设置了一个"Github页面"站点,因此可以在这里jeti.github.io/matrix/进行访问.

I have a Github project, github.com/jeti/matrix, and I set up a "Github pages" site for the project so that it is accessible here jeti.github.io/matrix/.

所有这些都可以通过Github进行配置.

That is all configurable through Github.

现在,我想添加个人网站的子域,以便可以通过我的网站jeti.io的子域matrix.jeti.io访问该网站.

Now, I would like to add a subdomain of my personal website so that the website is accessible via the subdomain matrix.jeti.io of my website jeti.io.

我真的很困惑该怎么做,因为文档似乎没有显示如何将项目页面重定向到子域.我尝试了一些我认为应该是正确输入的排列,但是由于这些DNS更改需要花费很长时间才能传播,因此实际上很难进行测试.

I am just really confused how to do that because the documentation don't seem to show how to redirect a project page to a subdomain. I have tried a few permutations of what I think should be the correct inputs, but because these DNS changes take so long to propagate, it is really hard to test.

具体来说,我想知道作为自定义域进入Github的价值(在我看来,这应该只是子域matrix.jeti.io,但我不确定,所以我将此留空了):

Specifically, I would like to know what value to enter into Github as the Custom domain (it seems to me that this should simply be the subdomain matrix.jeti.io, but I am not sure, so I have left this blank):

然后,我还需要创建子域.我是通过OVH购买域名的,他们为添加DNS条目提供了一些选择:

Then I also need to create the subdomain. I bought the domain through OVH, and they provide a few options for adding a DNS entry:

我的理解是,我需要添加2个顶点记录.我已经做到了:

My understanding is that I need to add 2 apex records. I did that already:

我不清楚我是否还需要添加一个CNAME条目.尝试添加CNAME条目时,表单是这样的:

What is unclear to me is whether I also need to add a CNAME entry. This is what the form looks like when I try to add a CNAME entry:

所以回顾一下:

  1. 我没有在Github网站上指定Custom Domain.
  2. 我创建了上面显示的2个顶点记录.
  3. 我没有创建CNAME条目.
  1. I did not specify the Custom Domain on the Github site.
  2. I created the 2 apex records shown above.
  3. I did not create a CNAME entry.

请告诉我这些步骤中的哪些步骤需要更改以及如何进行修改.

Please tell me which of these steps needs to be changed and how to modify it.

推荐答案

经过反复试验,答案似乎是

After more trial and error, the answer seems to be

  1. Github自定义域确实应该是matrix.jeti.io

我不需要顶点记录.实际上,Github给我发了电子邮件,不鼓励这样做.所以我删除了顶点记录.

I did not need the apex records. In fact, Github emailed me discouraging it. So I deleted the apex records.

让我感到困惑的是,我认为CNAME条目需要链接到项目名称为jeti.github.io/matrix的原始Github页面.那是错的.目标只是jeti.github.io.(注意最后的句点).

The thing that was confusing me is that I thought that the CNAME entry needed to have a link to the original Github pages WITH the project name jeti.github.io/matrix. That was wrong. The target is simply jeti.github.io. (Note the period on the end).

这篇关于Github页面项目的网站子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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