【问题标题】:GitLab and ISPConfig 3 issueGitLab 和 ISPConfig 3 问题
【发布时间】:2016-09-21 16:40:52
【问题描述】:

我在运行 Debian 8 和 Apache 的 VPS 上使用 ISPConfig 3 管理了一个网站。 该网站可通过 domain.ee 访问,但我想让我的 GitLab(同时)在 git.domain.ee 上运行

但是当我安装 GitLab 并运行它时,他覆盖了 ISPConfig 并开始在 git.domain.ee 和 domain.ee 上运行(以及所有其他指向我的 VPS 的地址)

这是我的 gitlab.rb 配置:

external_url 'http://git.domain.ee'
unicorn['port'] = 8080
web_server['external_users'] = ['www-data']

这是我由 apache 运行的 gitlab.conf:

<VirtualHost *:80>
    ServerName git.domain.ee
    ServerSignature Off
    ProxyPreserveHost On

    <Location />
        Order deny,allow
        Allow from all

        ProxyPassReverse http://127.0.0.1:8080
        ProxyPassReverse http://git.domain.ee/
    </Location>

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]

    DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

</VirtualHost>

显然 domain.ee 被替换为我的真实域名。

【问题讨论】:

    标签: apache gitlab ispconfig


    【解决方案1】:

    让 git 在 localhost:8080 上运行并将 apache 配置为反向代理 像这样:

    <VirtualHost *:80>
      ProxyPreserveHost On
      ProxyRequests Off
      ProxyVia Off
    
      <Proxy *>
         Require all granted
      </Proxy>
    
      ProxyPass / http://127.0.0.1:8080
      ProxyPassReverse / http://127.0.0.1:8080
    </VirtualHost>
    

    您可以根据需要添加其他规则

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-29
      • 1970-01-01
      • 1970-01-01
      • 2021-11-12
      • 2017-12-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多