我有一个网站管理与Debian3上运行的ISPConfig 8和阿帕奇。该网站可通过domain.ee访问,但我希望(同时)在git.domain.ee上运行我的GitLab
但当我安装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被我的真实域名取代了。
发布于 2017-06-21 19:05:37
让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>您可以根据需要添加其他规则
https://stackoverflow.com/questions/39622110
复制相似问题