About subdomain isolation
Subdomain isolation mitigates cross-site scripting and other related vulnerabilities. For more information, see "Cross-site scripting" on Wikipedia. We highly recommend that you enable subdomain isolation on お使いの GitHub Enterprise Server インスタンス.
When subdomain isolation is enabled, GitHub Enterprise Server replaces several paths with subdomains. After enabling subdomain isolation, attempts to access the previous paths for some user-supplied content, such as http(s)://HOSTNAME/raw/
, may return 404
errors.
Path without subdomain isolation | Path with subdomain isolation |
---|---|
http(s)://HOSTNAME/ | http(s)://docker.HOSTNAME/ |
http(s)://HOSTNAME/_registry/npm/ | https://npm.HOSTNAME/ |
http(s)://HOSTNAME/_registry/rubygems/ | https://rubygems.HOSTNAME/ |
http(s)://HOSTNAME/_registry/maven/ | https://maven.HOSTNAME/ |
http(s)://HOSTNAME/_registry/nuget/ | https://nuget.HOSTNAME/ |
http(s)://HOSTNAME/assets/ | http(s)://assets.HOSTNAME/ |
http(s)://HOSTNAME/avatars/ | http(s)://avatars.HOSTNAME/ |
http(s)://HOSTNAME/codeload/ | http(s)://codeload.HOSTNAME/ |
http(s)://HOSTNAME/gist/ | http(s)://gist.HOSTNAME/ |
http(s)://HOSTNAME/media/ | http(s)://media.HOSTNAME/ |
http(s)://HOSTNAME/notebooks/ | http(s)://notebooks.HOSTNAME/ |
http(s)://HOSTNAME/pages/ | http(s)://pages.HOSTNAME/ |
http(s)://HOSTNAME/raw/ | http(s)://raw.HOSTNAME/ |
http(s)://HOSTNAME/reply/ | http(s)://reply.HOSTNAME/ |
http(s)://HOSTNAME/uploads/ | http(s)://uploads.HOSTNAME/ |
http(s)://HOSTNAME/viewscreen/ | http(s)://viewscreen.HOSTNAME/ |
Not supported | https://containers.HOSTNAME/ |
Prerequisites
警告: Subdomain Isolation を無効化している場合は、エンタープライズの GitHub Pages も無効化することをおすすめします。 ユーザが提供するGitHub Pagesのコンテンツをその他のEnterpriseのデータから分離しておく方法はありません。 詳しくは、「Configuring GitHub Pages for your enterprise」を参照してください。
Before you enable subdomain isolation, you must configure your network settings for your new domain.
- Specify a valid domain name as your hostname, instead of an IP address. For more information, see "Configuring the hostname for your instance."
警告: 初期セットアップ後に GitHub Enterprise Server のホスト名を変更しないでください。 ホスト名を変更すると、インスタンスの停止やユーザーのセキュリティ キーの無効化など、予期しない動作が生じます。 インスタンスのホスト名を変更して問題が発生した場合は、GitHub Enterprise サポート または GitHub Premium Support に問い合わせてください。
- Set up a wildcard Domain Name System (DNS) record or individual DNS records for the subdomains listed above. We recommend creating an A record for
*.HOSTNAME
that points to your server's IP address so you don't have to create multiple records for each subdomain. - Get a wildcard Transport Layer Security (TLS) certificate for
*.HOSTNAME
with a Subject Alternative Name (SAN) for bothHOSTNAME
and the wildcard domain*.HOSTNAME
. For example, if your hostname isgithub.octoinc.com
, get a certificate with the Common Name value set to*.github.octoinc.com
and a SAN value set to bothgithub.octoinc.com
and*.github.octoinc.com
. - Enable TLS on your appliance. For more information, see "Configuring TLS."
Enabling subdomain isolation
-
GitHub Enterprise Server の管理アカウントから、任意のページの右上隅で をクリックします。
-
[サイト管理者] ページにまだ表示されていない場合は、左上隅の [サイト管理者] をクリックします。
-
[ サイト管理者] サイドバーで [Management Console] をクリックします。
-
[設定] サイドバーで [ホスト名] をクリックします。
-
Select Subdomain isolation (recommended).
-
[設定] サイドバーで [設定の保存] をクリックします。
注: [Management Console] に設定を保存すると、システム サービスが再起動され、ユーザーに表示されるダウンタイムが発生する可能性があります。
-
設定の実行が完了するのを待ってください。