简体   繁体   English

无法连接到局域网上的 Apache 服务器

[英]Can't Connect to Apache Server on LAN

I have a very simple LAN setup and am trying to connect to an Apache server running on the LAN.我有一个非常简单的 LAN 设置,并且正在尝试连接到在 LAN 上运行的 Apache 服务器。 The server IP is 192.168.1.178.服务器 IP 为 192.168.1.178。 I'm trying to connect from a box on same LAN with IP of 192.168.1.161.我正在尝试从 IP 为 192.168.1.161 的同一 LAN 上的一个盒子进行连接。 Attempting to connect from browser results in error saying site is unreachable.尝试从浏览器连接会导致错误提示站点无法访问。 I can ping the server and SSH into the server.我可以 ping 服务器和 SSH 到服务器。 But, telnet and curl result in no route to host errors.但是,telnet 和 curl 不会导致主机错误。

Both boxes are set up with static IPs.两个盒子都设置了静态 IP。 DNS for static connection is 192.168.1.1.静态连接的 DNS 是 192.168.1.1。 Both boxes are running Manjaro and no firewalls are turned on.两个盒子都在运行 Manjaro 并且没有打开防火墙。 Apache access logs show no attempt to connect and there are no errors in the Apache error logs. Apache 访问日志显示未尝试连接并且 Apache 错误日志中没有错误。

I also set up a test python server (sudo python -m http.server 80) to try that.我还设置了一个测试 python 服务器 (sudo python -m http.server 80) 来尝试。 Attempting to curl to that server results in 'connection refused' error as opposed to 'no route to host' error for the Apache server.尝试 curl 到该服务器会导致“连接被拒绝”错误,而不是 Apache 服务器的“无路由到主机”错误。

Traceroute results are:跟踪路由结果是:

 traceroute 192.168.1.178                                                
traceroute to 192.168.1.178 (192.168.1.178), 30 hops max, 60 byte packets
 1  raptor (192.168.1.178)  0.434 ms !X  0.366 ms !X  0.400 ms !X

I discovered that a firewall daemon was running, which was causing the problem.我发现防火墙守护进程正在运行,这导致了问题。 Disabling the firewall solved the issue.禁用防火墙解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM