更換gitlab自帶Nginx服務,使用自行編譯Nginx來管理gitlab服務。
編輯gitlab配置檔案禁用自帶Nignx伺服器
1
<code>vi</code> <code>/etc/gitlab/gitlab</code><code>.rb...</code><code>#設定nginx為false,關閉自帶Nginxnginx['enable'] = false...</code>
檢查預設nginx配置檔案,并遷移至新Nginx服務
<code>/var/opt/gitlab/nginx/conf/nginx</code><code>.conf </code><code>#nginx配置檔案,包含gitlab-http.conf檔案/var/opt/gitlab/nginx/conf/gitlab-http.conf #gitlab核心nginx配置檔案</code>
重新開機 nginx、gitlab服務
通路報502。原因是nginx使用者無法通路gitlab使用者的socket檔案。 重新開機gitlab需要重新授權
chmod -R o+x /var/opt/gitlab/gitlab-rails
本文轉自 kesungang 51CTO部落格,原文連結:http://blog.51cto.com/sgk2011/1926119,如需轉載請自行聯系原作者