Bitnami:如何配置的Apache2 GitLab 5.0应用程序不具有相对根?(Bitnami

2019-08-20 22:19发布

(Or how to make GitLab application as root application on Apache2 HTTP server. )

I have not used Apache2 before, but I got Bitnami GitLab VM with preinstalled server.

I and run into issues, because application root is relative. Bitnami GitLab 5.0 and git & Eclipse EGit quick start

The fix is to not using relative root, but run GitLab application as root on Apache2 HTTP server.

I have found configuration files location using Bitnami wiki for Apache component:

1) /opt/bitnami/apache2/conf/httpd.conf is absent.

2) Apache2 config for GitLab aplication: gitlab.conf

Please help:

How to configure GitLab 5.0 application in Apache2 not to have relative root?

UPDATE: This is still unsolved, my own answer doesn't help.

Answer 1:

你有没有再次预编译的资产? 要做到这一点,你应该运行:

$ cd /opt/bitnami/apps/gitlab/htdocs
$ bundle exec bin/rake assets:precompile RAILS_RELATIVE_URL_ROOT='/'

然后重新启动Apache服务器。

更多信息: http://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_change_the_default_URL_to_the_root.3f

我希望它能帮助。

问候。



Answer 2:

Bitnami维基Apache的组成部分-如何更改URL?

2种方法

如果要更改默认网址http://your_domain/your_applicationhttp://your_domain ,你应该添加在你的应用程序的conf文件“的DocumentRoot”条目。 编辑/opt/bitnami/apps/your_application/conf/your_application.conf文件中加入这一行,并征求意见的“别名”条目。 您可以使用“纳米”主编:

$ sudo nano /opt/bitnami/apps/your_application/conf/your_application.conf

your_application.conf文件内容:

DocumentRoot "/opt/bitnami/apps/your_application/htdocs"
# Alias /your_application/ "/installdir/apps/your_application/htdocs/"
# Alias /your_application "/installdir/apps/your_application/htdocs"

(...)

一些应用程序也需要在它们的配置文件或数据库的变化。

/opt/bitnmai/apps/gitlab/gitlab.conf更改后:

DocumentRoot /opt/bitnami/apps/gitlab/htdocs/public

<Directory "/opt/bitnami/apps/gitlab/htdocs/public">
   Options -MultiViews
   allow from all
</Directory>

PassengerDefaultUser git
PassengerDefaultGroup git

PassengerPreStart htttp://127.0.0.1:80/

又见http://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_change_the_default_URL_to_the_root.3f



Answer 3:

BitNami GitLab 6.0已经发布,它是在默认的根URL配置。



文章来源: Bitnami: How to configure GitLab 5.0 application in Apache2 not to have relative root?