问题
(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.
回答1:
Have you precompiled the assets again? To do so, you should run:
$ cd /opt/bitnami/apps/gitlab/htdocs
$ bundle exec bin/rake assets:precompile RAILS_RELATIVE_URL_ROOT='/'
Then restart Apache server.
More info: http://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_change_the_default_URL_to_the_root.3f
I hope it helps.
Regards.
回答2:
Bitnami wiki for Apache component - How to change the URL?
2) way
If you want to change the default URL from
http://your_domain/your_application
tohttp://your_domain
, you should add a "DocumentRoot" entry in your application conf file. Edit the /opt/bitnami/apps/your_application/conf/your_application.conf file to add this line and commenting the "Alias" entries. You can use the "nano" editor:
$ sudo nano /opt/bitnami/apps/your_application/conf/your_application.conf
your_application.conf file content:
DocumentRoot "/opt/bitnami/apps/your_application/htdocs"
# Alias /your_application/ "/installdir/apps/your_application/htdocs/"
# Alias /your_application "/installdir/apps/your_application/htdocs"
(...)
Some applications also require changes in their configuration files or in the database.
/opt/bitnmai/apps/gitlab/gitlab.conf
after changes:
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/

See also http://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_change_the_default_URL_to_the_root.3f
回答3:
BitNami GitLab 6.0 has been released and it is configured in the root URL by default.
来源:https://stackoverflow.com/questions/15900937/bitnami-how-to-configure-gitlab-5-0-application-in-apache2-not-to-have-relative