我正在尝试通过外部 IP 地址连接到我新安装的 Apache Web 服务器。通过 127.0.0.1 连接没问题,这只是使用外部 IP 地址时的问题。
我的操作系统是 Ubuntu 13.10。我正在使用 Apache 2.4 并监听端口 80。
我已经在我的路由器上设置了转发,并通过使用http://canyouseeme.org/上的服务检查了这一点,其中端口 80 显示为打开。我可以使用我的外部 IP 地址并指定端口 80 通过 telnet 建立连接,并且还检查了http://downforeveryoneorjustme.com/那里说我的网站已启动???
如果有帮助,我也尝试了所有这些与其他端口的测试。
我的 ufw 不活跃,但是,我的 iptables 中确实有一行,作为我解决问题的一部分,我添加了一行,内容如下:
26 1557 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
Run Code Online (Sandbox Code Playgroud)
如果有帮助,我在下面包含了我的 Apache 配置文件。
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# …Run Code Online (Sandbox Code Playgroud)