apache - 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。
解决方案
如果我没记错的话,你应该:80
直接从谷歌云仪表板启用端口或你使用的任何东西。
推荐阅读
- java - EWS API 中的 OnEvent API 在接收收件箱中的每封电子邮件时侦听两次
- tensorflow - 如何在 Keras 中使用 fit_generator 访问和更新每一层的权重?
- jupyter-notebook - 如何在 pd.read_sql 中为德语字符指定特殊编码
- amazon-web-services - NoSQL 鼓励基于访问模式设计数据库。当模式发生变化时该怎么办?
- javascript - 如何开启触控模式?
- c# - “有什么方法可以通过特定位置(例如opencvforunity中的(x,y))在图像中访问像素”
- html - 如何使用 Bootstrap 4 对齐嵌套表单行?
- node.js - Sequelize 包含两个表中的两个 where 条件
- laravel - 方法 Illuminate\View\View::response 不存在
- java - 在活动中调用 onPause 时暂停服务上的线程执行