我想使用非捆绑的nginx,我覆盖了/etc/gitlab/gitlab.rb设置
nginx['enable'] = false
,然后执行以下命令:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
我发现捆绑的nginx仍在启动,并且占用了80端口; 我启动现有的nginx,然后得到:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
之后,我想换种方式,我可以更改捆绑nginx的端口,例如8088;
我将/etc/gitlab/gitlab.rb设置为nginx['listen_port'] = 8888
覆盖,然后重新配置并重新启动gitlab;
但是我发现端口没有改变;我打开文件'/var/opt/gitlab/nginx/conf/gitlab-http.conf',主要代码如下:
server {
listen *:80;
...
...
捆绑软件nginx仍然监听80端口;
我不知道如何解决现有nginx和bundle nginx之间的冲突;任何提示都值得赞赏!
答案 0 :(得分:0)
我已修复此问题,因为我忘记了注释代码。