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

在一台服务器上运行 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>

打开项目配置文件

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>

答案1

设置 gitlab 监听 81 端口。现在你可以访问以下网站:

yoursite.com:81/gitlab

yoursite.com/openproject

相关内容