2016-09-21 59 views
0

我有一個運行Debian 8和Apache的VPS上的ISPConfig 3管理的網站。 該網站是通過domain.ee訪問,但我想讓我的GitLab在git.domain.ee上運行(同時)在git.domain.eeGitLab和ISPConfig 3問題

但是當我安裝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'] 

,這裏是我的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被替換爲我的真實域名。在localhost

回答

0

讓git的運行: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> 

,你需要他們

您可以添加其他規則