安装后本机的nginx就没办法启动了
Nginx 无法启动原因
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8081 failed (98: Address already in use)
两个Nginx 冲突了,遇到了很多难题。端口绑定问题
路径 vi /etc/gitlab/gitlab.rb
nginx['enable'] = false 禁用自带nginx
gitlab_workhorse['listen_network'] = "tcp" 允许gitlab-workhorse监听TCP
gitlab_workhorse['listen_addr'] = "127.0.0.1:8091" 设置gitlab端口为8091 注意自己的 8091未占用
external_url 'http://git.xxx.com:80' 设置git访问: 域名:nginx端口 此处80为独立nginx端口
gitlab_rails['trusted_proxies'] = ['git.xxx.com'] 设置gitlab域名
Nginx 配置
git.java-er.com.conf
server {
listen 80;
server_name git.yj09.com;
client_max_body_size 200m;
location / {
index index.html index.htm index.php;
root html;
proxy_pass http://127.0.0.1:8091;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}