If you configure a hostname instead of a hard-coded IP address, you will be able to change the physical hardware that your GitHub Enterprise Server instance runs on without affecting users or client software.
The hostname setting in the 管理控制台 should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be github.companyname.com.
Web and API requests will automatically redirect to the hostname configured in the 管理控制台. Note that localhost
is not a valid hostname setting.
Hostnames must be less than 63 characters in length per Section 2.3.4 of the Domain Names Specification RFC.
After you configure a hostname, you can enable subdomain isolation to further increase the security of your GitHub Enterprise Server instance. For more information, see "Enabling subdomain isolation."
For more information on the supported hostname types, see Section 2.1 of the HTTP RFC.
警告:初始设置后不要更改 GitHub Enterprise Server 的主机名。 更改主机名将会导致意外的行为,甚至包括实例中断。
-
从 GitHub Enterprise Server 上的管理帐户任意页面的右上角,单击 。
-
如果� 尚未在“站点管理员”页上,请在左上角单击“站点管理员”。
-
在左侧边� �中,单击“管理控制台”。
-
在左侧边� �中,单击“主机名”。
-
Type the hostname you'd like to set for your GitHub Enterprise Server instance.
-
To test the DNS and SSL settings for the new hostname, click Test domain settings.
-
如果在所有条目旁边没有看到绿色的复选� �记,请检查配置,查找失效的设置。 有关详细信息,请参阅“配置 DNS 域名服务器”。
-
在左侧边� �下,单击“保存设置”。
注意:保存 管理控制台 中的设置会重启系统服务,这可能会导致用户可察觉的停机时间。
-
等待配置运行完毕。
To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for your GitHub Enterprise Server instance after you configure a hostname. For more information, see "Enabling subdomain isolation."