我已经成功地在Ubuntu 14.04上使用https://about.gitlab.com/downloads/#ubuntu1404安装了Gitlab,但我正在努力通过web(https://my.example.com/gitlab)重定向并访问它。使用SSL的Apache2上的Gitlab
我已经修改/etc/gitlab/gitlab.rb
到:
external_url 'https://my.example.com/gitlab'
nginx的[ '启用'] = FALSE
并与sudo gitlab-ctl reconfigure
重新配置如果我去掉:
web_server [ 'external_users'] = [ 'WWW的数据']
我得到:
配方编译错误在 /选择/ gitlab /嵌入/食谱/高速缓存/食谱/ gitlab-EE /食谱/默认
NoMethodError -------------未定义的方法' - ”为零:NilClass
食谱跟踪: --------------- /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:21:in
from_file'
from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in
/opt/gitlab /embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:18:in `from_file”相关文件内容: --------------- ------- /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:
14:#请参阅许可证以了解管理 权限的特定语言和15:#限制根据许可证。 16:#17: 18:Gitlab [:node] = node 19:20:if File.exists?('/etc/gitlab/gitlab.rb')21 >>
Gitlab.from_file('/ etc/gitlab/gitlab.rb ')22:端部23:24: node.consume_attributes(Gitlab.generate_config(节点[' FQDN']))25:
我已尝试加入各种gitlab.conf到/etc/apache2/sites-available/
但https://my.example.com/gitlab没有重定向到Gitlab登录页面,我从主页上运行的Redmine服务中收到“Page not found”。目前default-ssl.conf
使用DocumentRoot /var/www
而Gitlab DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
。 Apache2配置为使用SSL。
更新1
我已经做符号链接:
sudo ln -s /opt/gitlab/embedded/service/gitlab-rails/public /var/www/gitlab
所以现在可以在默认的ssl.conf配置。
不期待Gitlab主页,而
Alias /gitlab "/var/www/gitlab/deploy.html"
效果很好。什么是Gitlab主页目录? index.html文件在哪里?
更新2
如果我添加
RackBaseURI /gitlab
RailsBaseURI /gitlab
<Directory /var/www/gitlab>
Allow from all
Options -MultiViews
</Directory>
我进入https://my.example.com/gitlab/
Web应用程序无法启动
它看起来像捆扎机后得到错误无法找到一颗宝石。也许你没有安装这个应用程序需要的所有宝石。要安装你的宝石,请运行:
捆绑安装
如果没有工作,那么问题可能是由您的应用程序引起的>不同的环境比它应该被下运行。请检查>以下:
Is this app supposed to be run as the www-data user? Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
--------例外如下:------- 找不到任何来源耙10.5.0(捆扎机:: GemNotFound)
/var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in
block in materialize' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in
map!' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:inmaterialize' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in
specs' /var/lib/gems/1.9.1/gems/bundler- 1.12.5/lib/bundler/definition.rb:185:specs_for' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/definition.rb:174:in
requested_specs'
上面的异常在更新Ruby之后解决了。
更新3
现在,我得到
与
Alias /gitlab "/var/www/gitlab"
AllowEncodedSlashes NoDecode
<Directory /var/www/gitlab>
Options Indexes FollowSymLinks MultiViews
PassengerAppRoot "/var/www/gitlab"
RailsBaseURI /var/www/gitlab
AllowOverride None
Order allow,deny
allow from all
</Directory>
如何配置Gitlab和的Apache2得到Gitlab第一页进入https://my.example.com/gitlab什么时候?
相关:http://serverfault.com/questions/822716/gitlab-https-uri-for-repository-cloning-does-not-work-ssl-host-could-not-beve – Justas