Gitlab in a subdirectory with apache and passenger

后端 未结 5 1641
北荒
北荒 2021-02-02 17:39

I\'m attempting to set up gitlab so that it is accessible through a subdirectory of an existing apache server, example.com/gitlab, for example. I am trying to use p

5条回答
  •  悲哀的现实
    2021-02-02 18:24

    I don't think that Passenger is the easiest way to configure Apache for GitLab. Using a local reverse proxy is actually more simple.

    The lastest version of GitLab (6.0) is using Unicorn, but it almost the same with Puma.

    In your config/unicorn.rb file, comment listen directive and add:

    listen "127.0.0.1:9242"
    

    In your Apache configuration, you can then add

    ProxyPass         /gitlab http://127.0.0.1:9242
    ProxyPassReverse  /gitlab http://127.0.0.1:9242
    

    Restart Apache and GitLab, and it should work.

提交回复
热议问题