【发布时间】:2020-08-23 10:10:17
【问题描述】:
我在 gcp 上创建了一个测试 vm 实例:
- 安装apache2服务启动成功apache2 started
- 默认防火墙设置:firewall setup
- apache 端口配置:port config
- 外网ip:external ip
似乎没问题,但我无法通过外部 ip 访问,因为文档中说https://cloud.google.com/community/tutorials/setting-up-lamp
请给我一些建议,谢谢。
==================================
卷曲 --head http://35.240.177.89/ curl: (7) 连接35.240.177.89端口80失败:操作超时
卷曲 --head https://35.240.177.89/ curl: (7) 连接35.240.177.89端口443失败:操作超时
netstat -lntup: result
【问题讨论】:
-
使用命令
curl --head http://IP和curl --head https://IP。替换为您的 IP 地址。结果如何?使用每个命令和输出编辑您的问题。 -
@JohnHanley 我刚刚更新了结果
-
添加此命令的输出:
netstat -lntup。如果您配置了 HTTPS 端口 443,则输出应显示端口 80 的LISTEN。确保他们正在侦听0.0.0.0而不是127.0.0.1。如果您有正确的侦听器,那么您有防火墙阻止访问,或者您指定了错误的 IP 地址。确保 Linux 防火墙已禁用或允许端口 80 和 443。 -
我只是添加了net stat结果和外部IP图像,似乎正确..
标签: google-cloud-platform apache2