简体   繁体   中英

gitlab-ce on pre-installed nginx server on centos 8 gives 502 error

I am getting the 502 Whoops, GitLab is taking too much time to respond error on my fresh Manual installation of Gitlab-ce 13.2.4 on CENTOS 8 (nginx/1.16.1).

I downloaded the rpm gitlab-ce-13.2.4-ce.0.el8.x86_64.rpm

  • dnf -y install policycoreutils-python-utils
  • rpm -Uvh gitlab-ce-13.2.4-ce.0.el8.x86_64.rpm
  • /etc/gitlab/gitlab.rb >> external_url "https://git.mydomain.com"
  • /etc/gitlab/gitlab.rb >> nginx['enable'] = false
  • /etc/gitlab/gitlab.rb >> web_server['external_users'] = ['nginx']
  • /etc/gitlab/gitlab.rb >> gitlab_rails['trusted_proxies'] = [ '172.16.1.0/24', '192.168.10.0/24']
  • /etc/nginx/conf.d/git.mydomain.com.conf >> https://gitlab.com/gitlab-org/gitlab-foss/-/raw/master/lib/support/nginx/gitlab-ssl
  • systemctl restart nginx
  • gitlab-ctl reconfigure

My git.mydomain.com.conf

My selinux was blocking the url to run. probably the gitlab directory access. I run setenforce 0 and it worked (which is not a good practice though).

EDIT: chcon -R -t httpd_sys_rw_content_t /var/opt/gitlab/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM