gitlab

这里解决gitlab文件上传大小限制

http://blog.csdn.net/fdipzone/article/details/45544497

通过浏览器debug知道是nginx服务解释器

进入linux

通过百度知道大概的路径

/opt/gitlab-7.4.3-0/apps/gitlab/htdocs/app/views/layouts

cd /

cd pot

ls

...

查看nginx的安装目录

http://www.cnblogs.com/hellowzd/p/6228144.html

nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx

[root@localhost sbin]# cd nginx
-bash: cd: nginx: 不是目录
[root@localhost sbin]# vi nginx
[root@localhost sbin]# cd ../
[root@localhost embedded]# ls
bin   cookbooks  html     lib      logs  nodes       sbin     service  ssl
conf  etc        include  libexec  man   postgresql  selinux  share    var
[root@localhost embedded]# cd conf
[root@localhost conf]# ls
fastcgi.conf            koi-win             scgi_params
fastcgi.conf.default    mime.types          scgi_params.default
fastcgi_params          mime.types.default  uwsgi_params
fastcgi_params.default  nginx.conf          uwsgi_params.default
koi-utf                 nginx.conf.default  win-utf

找到nginx.conf了

在http{}段中加入 client_max_body_size 20m; 20m为允许最大上传的大小

vi nginx.conf

esc

:wq!

检查配置文件是否正确

 /opt/gitlab/embedded/sbin/nginx -t 

nginx: the configuration file /opt/gitlab/embedded/conf/nginx.conf syntax is ok
nginx: configuration file /opt/gitlab/embedded/conf/nginx.conf test is successful

重启

查看进程

ps -ef | grep nginx

kill -QUIT 11479 杀掉进程

未解决问题

通过百度搜索发现

http://blog.csdn.net/suirosu/article/details/40045983

通过百度组合搜索查询gitlab.yml的位置

/opt/gitlab/embedded/sbin/nginx gitlab.yml

https://segmentfault.com/q/1010000002646550

/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
/opt/gitlab/embedded/service/gitlab-shell/config.yml

nginx重启

gitlab-ctl 守护进程启动的 nginx.要使用gitlab-ctl restart nginx.
ok: run: nginx: (pid 10768) 1s
gitlab-ctl restart //全部重启

报502通过追踪发现是gitlab.yml配置文件改错了(思路见:http://blog.csdn.net/wangxicoding/article/details/43738137,和他的问题不一样,借鉴的它的思路)

修改,重启,正常

too large的问题还是没解决,把linux命令学习了一遍。。。

原文地址:https://www.cnblogs.com/hellowzd/p/6226769.html