我在让Apache工作时遇到了问题。我遵循亚马逊AWS说明(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html)但我的计算机拒绝加载Amazon Linux测试屏幕。
在运行时curl localhost
,我确实看到了测试屏幕的HTML,所以它可能意味着端口不正确?
我跑了netstat -lnp
并粘贴了下面的输出:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:55001 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 :::22 :::* LISTEN -
tcp 0 0 :::49475 :::* LISTEN -
tcp 0 0 :::111 :::* LISTEN -
tcp 0 0 :::80 :::* LISTEN -
udp 0 0 0.0.0.0:58316 0.0.0.0:* -
udp 0 0 0.0.0.0:974 0.0.0.0:* -
udp 0 0 127.0.0.1:1001 0.0.0.0:* -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:111 0.0.0.0:* -
udp 0 0 172.31.25.11:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp 0 0 :::974 :::* -
udp 0 0 :::53736 :::* -
udp 0 0 :::111 :::* -
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 7784 - @/com/ubuntu/upstart
unix 2 [ ACC ] SEQPACKET LISTENING 8016 - @/org/kernel/udev/udevd
unix 2 [ ACC ] STREAM LISTENING 9141 - /var/run/rpcbind.sock
unix 2 [ ACC ] STREAM LISTENING 9314 - /var/run/dbus/system_bus_socket
我也跟着https://help.ubuntu.com/community/IptablesHowTo并接受了到80端口的所有流量。
跑步sudo iptables -L -V
,我得到:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
61 4144 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
6 866 ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
0 0 DROP all -- any any anywhere anywhere
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 16 packets, 2356 bytes)
pkts bytes target prot opt in out source destination
任何帮助将非常感激!
code formatting
。请在下次阅读Markdown帮助。