美文网首页
在 GitLab开启相对URL

在 GitLab开启相对URL

作者: Mlotjve | 来源:发表于2018-09-12 14:49 被阅读0次

    Follow the steps below to enable relative URL in GitLab:

    1. (Optional) If you run short on resources, you can temporarily free up some memory by shutting down Unicorn and Sidekiq with the following command:

      sudo gitlab-ctl stop unicorn
      sudo gitlab-ctl stop sidekiq
      
      
    2. Set the external_url in /etc/gitlab/gitlab.rb:

      external_url "https://example.com/gitlab"
      
      

      In this example, the relative URL under which GitLab will be served will be /gitlab. Change it to your liking.

    3. Reconfigure GitLab for the changes to take effect:

      sudo gitlab-ctl reconfigure
      
      
    4. Restart the services so that Unicorn and Sidekiq picks up the changes

      sudo gitlab-ctl restart
      
      

    If you stumble upon any issues, see the troubleshooting section.

    Disable relative URL in GitLab

    To disable the relative URL, follow the same steps as above and set up the external_url to a one that doesn't contain a relative path. You may need to explicitly restart Unicorn after the reconfigure task is done:

    sudo gitlab-ctl restart unicorn
    
    

    If you stumble upon any issues, see the troubleshooting section.

    相关文章

      网友评论

          本文标题:在 GitLab开启相对URL

          本文链接:https://www.haomeiwen.com/subject/ccivgftx.html