Search code examples
nginxcentos8gitlab-ce

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


Solution

  • 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/