[英]Can you add multiple custom domains to multiple Github repositories?
我知道您可以创建子域名重定向到不同的存储库,例如:
example.com
foo.example.com
但你能做的事情如下:
example.com > foobar.github.io
differentdomain.com > foobar.github.io/different-repository
或者有一些方法可以将新的自定义域重定向到特定的存储库?
有在Github上的页面foobar.github.io
你需要一个用户(或“organiaztion”)帐户github.com/foobar
,并在仓库github.com/foobar/foobar.github.io
。
有在Github上的页面foobar.github.io/different-repository
你需要一个分支gh-pages
在github.com/foobar/different-repository
。
要将example.com
配置为显示foobar.github.io
,请将DNS记录A
添加到指向Github Pages IP的域中,并添加内容为“example.com”的文件github.com/foobar/foobar.github.io/CNAME
(不要忘记添加,提交和推送)。
要配置differentdomain.com
以显示foobar.github.io/different-repository
,请将DNS记录A
添加到指向Github Pages IP的域中,并在gh-pages
分支中添加文件github.com/foobar/different-repository/CNAME
内容“differentdomain.com”(添加,提交,推送)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.