首页 > 解决方案 > curl: (7) 连接到 35.229.60.183:80 失败;(谷歌云上的虚拟机)连接被拒绝

问题描述

Linux世界的新手。

我已经设置了两个 apache webserver,一个 haproxy 和一个 testpc。我可以使用端口 80 上的 index.html 内容来卷曲 Web 服务器。但是当我尝试在任何端口或端口 80 上卷曲 haproxy 时,我会卷曲:

(7) 连接35.229.60.183:80失败;拒绝连接

关闭所有服务器上的防火墙,重新启动 haproxy。

haproxy 配置文件:

defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           100s
    maxconn                 3000

frontend myserver
bind *:80
default_backend mybackendserver

mybackendserver
 balance roundrobin
 mode http
 server webserver       35.185.18.206:80        check
 server webserver1      35.231.241.247:80       check

当我尝试在我的测试机器中卷曲它们时,我正在卷曲:

(7) 连接35.229.60.183:80失败;拒绝连接

35.229.60.183是我的 haproxy 服务器的 ip。

标签: apachewebserverhaproxy

解决方案


如果我没记错的话,你应该:80直接从谷歌云仪表板启用端口或你使用的任何东西。

看一下这个。


推荐阅读