gitlab安装各种坑
2016-07-19 11:16
507 查看
参考:https://bbs.gitlab.cc/topic/35/gitlab-ce-8-7-%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85%E6%89%8B%E5%86%8C-centos6-rehl6/2
架构:源码安装, 数据库用mysql,网站用nginx
坑一.nginx报错
解决方案:把git加入www用户组,并赋予实行权限
坑三:
架构:源码安装, 数据库用mysql,网站用nginx
坑一.nginx报错
2016/07/19 09:26:11 [crit] 3881#0: *10 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket failed (13: Permission denied) while connecting to upstream, client: 192.168.1.180, server: www.gitlab810.com, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket:/", host: "www.gitlab810.com" 2016/07/19 09:26:11 [error] 3881#0: *10 open() "/home/git/gitlab/public/502.html" failed (13: Permission denied), client: 192.168.1.180, server: www.gitlab810.com, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket/", host: "www.gitlab810.com"这是因为我的nginx使用的是www用户运行,而/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket/用户组是git,
解决方案:把git加入www用户组,并赋予实行权限
usermod -a -G git www chmod g+rx /home/git/坑二:nginx配置不准确
[root@gitlaba git]# cat /usr/local/nginx/conf/vhosts.d/gitlab.conf |grep -v '#' upstream gitlab-workhorse { server unix:/home/git/gitlab/tmp/sockets/gitlab-workhorse.socket fail_timeout=0; } server { listen 80 ; server_name www.gitlab810.com; server_tokens off; access_log logs/gitlab_access.log; error_log logs/gitlab_error.log; location / { client_max_body_size 0; gzip off; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://gitlab-workhorse; } error_page 404 /404.html; error_page 422 /422.html; error_page 500 /500.html; error_page 502 /502.html; error_page 503 /503.html; location ~ ^/(404|422|500|502|503)\.html$ { root /home/git/gitlab/public; internal; } }注意第55行:proxy_set_header Host $http_host; 要修改成自己的server_name
坑三:
[root@gitlaba git]# vim /home/git/gitlab-shell/config.yml --- user: git gitlab_url: "http://www.gitlab810.com/" http_settings: self_signed_cert: false auth_file: "/home/git/.ssh/authorized_keys" redis: bin: /usr/local/redis/redis-cli namespace: resque:gitlab host: 127.0.0.1 port: 6379 log_level: INFO audit_usernames: falsegitlab_url: "http://www.gitlab810.com/" 这一项得用标准格式,我使用www.gitlab810.com的形式就报错
相关文章推荐
- nginx代理指定目录
- 访问Nginx发生SSL connection error的一种情况
- Nginx+Naxsi部署专业级Web应用防火墙
- CentOS 6.2实战部署Nginx+MySQL+PHP
- nginx中http核心模块的配置指令2
- nginx中http核心模块的配置指令3
- nginx中http核心模块的配置指令4
- nginx中http的fastcgi模块的配置指令1
- Nginx 学习笔记(一)
- 网站502与504错误分析
- 用zabbix监控nginx_status状态
- 艰难完成 nginx + puma 部署 rails 4的详细记录
- 把Lua编译进nginx步骤方法
- web 应用中常用的各种 cache详解
- Linux系统上配置Nginx+Ruby on Rails+MySQL超攻略
- window+nginx+php环境配置 附配置搭配说明
- 解析CI即CodeIgniter框架在Nginx下的重写规则
- 将PHP从5.3.28升级到5.3.29时Nginx出现502错误