在centos 8上预安装的nginx服务器上的gitlab-ce给出502错误

问题描述

我得到 502糟糕,GitLab在我在CENTOS 8(Nginx)上手动安装Gitlab-ce 13.2.4时花了太多时间来响应 错误/1.16.1)。

我下载了转速gitlab-ce-13.2.4-ce.0.el8.x86_64.rpm

  • conn = pyodbc.connect() cursor = conn.cursor() cursor.executemany("Update proj.[mid].[datahub] SET assigned_to = ?,[caller_id#user_name] = ?,state = ?,assignment_group = ?,business_duration = ?,business_service = ?,category = ?,u_category_structure = ?,u_resolution_ci = ?,resolved_by = ?,u_resolver_group = ?,u_service_provider = ?,sys_created_on = ?,caller_id = ?,u_caller_first_name = ?,u_caller_last_name = ?,u_vendor_category = ?,rfc = ?,closed_at = ?,closed_by = ?,contact_type = ?,sys_created_by = ?,u_customer_portal_state = ?,description = ?,u_first_call_resolution = ?,u_first_time_fix = ?,impact = ?,u_incident_age = ?,kNowledge = ?,reopened_by = ?,location = ?,u_on_behalf_of = ?,opened_at = ?,opened_by = ?,priority = ?,reassignment_count = ?,u_resolution_method = ?,close_code = ?,close_notes = ?,calendar_stc = ?,resolved_at = ?,u_sd_esclation = ?,sla_due = ?,severity = ?,short_description = ?,reopen_count = ?,subcategory = ?,sys_updated_by = ?,urgency = ?,sys_updated_on = ?,[assigned_to#active] = ? WHERE number = ?",result) cursor.commit()
  • 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

我的git.mydomain.com.conf

解决方法

我的selinux阻止了该URL的运行。可能是gitlab目录访问。 我运行lazy val showAllSourceDirs = taskKey[Unit]("show source directories of all projects") showAllSourceDirs := { println((apiSpecProject / Compile / sourceDirectories).value) println((apiModule / Compile / sourceDirectories).value) } 并成功了(虽然这不是一个好习惯)。

编辑:chcon -R -t httpd_sys_rw_content_t / var / opt / gitlab /