在一台服务器上运行Gitlab和Openproject

我在我的apache2服务器上运行Gitlab和OpenProject都运行良好,但一旦启动Gitlab,OpenProject将响应一个错误,找不到目录。 我认为这可能与我的重写规则在gitlab的Vhost文件中这里都是conf文件

Gitlab.conf

<VirtualHost *:80> ServerName euve252630.serverprofi24.de ServerSignature Off ProxyPreserveHost On <Location /> Order deny,allow Allow from all ProxyPassReverse http://127.0.0.1:8080 ProxyPassReverse http://euve252630.serverprofi24.de/ </Location> RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA] # needed for downloading attachments DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public </VirtualHost> 

openproject.conf

 Include /etc/openproject/addons/apache2/includes/server/*.conf <VirtualHost *:80> ServerName euve252630.serverprofi24.de DocumentRoot /opt/openproject/public ProxyRequests off # Can't use Location block since it would overshadow all the other proxypass directives on CentOS ProxyPass /openproject/ http://127.0.0.1:6000/openproject/ retry=0 ProxyPassReverse /openproject/ http://127.0.0.1:6000/openproject/ </VirtualHost> 

设置gitlab来监听端口81.现在你可以访问这个站点了

yoursite.com:81/gitlab

yoursite.com/openproject