配置自定义端口后,gitlab服务器超时

时间:2019-05-21 16:40:53

标签: nginx gitlab ubuntu-18.04

我正在努力从Apache Web服务器上获得gitlab。

我已经成功安装了gitlab并使用嵌入式nginx运行它。我还成功激活了https。但是,当我尝试更改外部网址端口(在http和https两种模式下)时,我的浏览器出现超时错误。

有关信息,我正在可从注册域访问的远程Ubuntu 18.04.2服务器上运行gitlab,并从家里的计算机上使用Chrome和Safari浏览。

我已经将gitlab重新配置了一百次。我检查了涉及的不同端口,以确保它们被防火墙允许并由预期的进程侦听。一切对我来说都很好。

在/etc/gitlab/gitlab.rb中,我已经完成了gitlab网站上针对自定义端口的描述:

external_url 'http://gitlab.mydomain.com:10443'
...
nginx['enable'] = true

在标准端口80和443上时,我在/var/log/gitlab/nginx/gitlab_access.log中获得访问日志。但是,一旦添加了自定义端口,我将一无所获。

“ ufw status verbose” cmd的结果:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
...               
8080/tcp                   ALLOW IN    Anywhere                
10443/tcp                  ALLOW IN    Anywhere         
...         
8080/tcp (v6)              ALLOW IN    Anywhere (v6)             
10443/tcp (v6)             ALLOW IN    Anywhere (v6)

'netstat -tulpn'cmd的结果:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name 
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      14865/unicorn maste
tcp        0      0 0.0.0.0:10443           0.0.0.0:*               LISTEN      21422/nginx: master 
tcp        0      0 0.0.0.0:8060            0.0.0.0:*               LISTEN      21422/nginx: master 

甚至很奇怪的是,当我执行cmd'nc -vz gitlab.mydomain.com 10443'时,它会成功:

Connection to gitlab.mydomain.com 10443 port [tcp/*] succeeded!

http://gitlab.mydomain.com:10443(或其激活时的SSL版本)的请求在Chrome上以ERR_CONNECTION_TIMED_OUT结尾,并且'Safari无法打开页面“ gitlab.mydomain.com:10443”,因为服务器位于该页面在Safari上位于“没有响应”。

请帮助。

0 个答案:

没有答案