Skip to main content

Эта версия GitHub Enterprise Server была прекращена 2024-09-25. Исправления выпускаться не будут даже при критических проблемах безопасности. Для повышения производительности, повышения безопасности и новых функций выполните обновление до последней версии GitHub Enterprise Server. Чтобы получить справку по обновлению, обратитесь в службу поддержки GitHub Enterprise.

Настройка GitHub Pages для предприятия

Вы можете включить или отключить GitHub Pages для предприятия и выбрать, сделать ли сайты общедоступными.

Enabling public sites for GitHub Pages

If private mode is enabled on your enterprise, the public cannot access GitHub Pages sites hosted by your enterprise unless you enable public sites.

Warning: If you enable public sites for GitHub Pages, every site in every repository on your enterprise will be accessible to the public.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the "Settings"" sidebar, click Pages.

  5. Select Public Pages.

  6. Under the "Settings" sidebar, click Save settings.

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  7. Wait for the configuration run to complete.

Disabling GitHub Pages for your enterprise

If subdomain isolation is disabled for your enterprise, you should also disable GitHub Pages to protect yourself from potential security vulnerabilities. For more information, see "Enabling subdomain isolation."

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the "Settings"" sidebar, click Pages.

  5. Deselect Enable Pages.

  6. Under the "Settings" sidebar, click Save settings.

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  7. Wait for the configuration run to complete.

Configuring GitHub Pages response headers for your enterprise

You can add or override response headers for GitHub Pages sites hosted by your GitHub Enterprise Server instance.

Warning: Ensure that your response headers are properly configured before saving. Improper configurations may negatively impact the security of your GitHub Enterprise Server instance.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. In the " Site admin" sidebar, click Management Console.

  4. In the "Settings"" sidebar, click Pages.

  5. Under "Http Header Name," type the header name. The length of header name should less than 128 characters.

  6. Under "Http Header Value," type the header value. The length of header value should less than 300 characters.

  7. Click Add headers.

  8. Under the "Settings" sidebar, click Save settings.

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  9. Wait for the configuration run to complete.

Further reading