Nginx无法在本地网络工作
问题描述:
os centos 6.3 Nginx不能在本地网络中工作,但它在本地主机上工作。由elinks测试。Nginx无法在本地网络工作
# ps -ef | grep nginx
root 1447 1 0 Aug07 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 1448 1447 0 Aug07 ? 00:00:00 nginx: worker process
# netstat -napt | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1447/nginx
# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
答
这听起来像这不是一个Nginx问题。你在Nginx访问或错误日志中看到任何访问尝试?你应该如果这是一个Nginx问题。
您的netstat
输出显示Nginx正在运行并在所有IP上的端口80上侦听。检测使用nmap
端口扫描自己和确认的东西在端口80上运行
尝试:
nmap -vv -P0 (server IP address or DNS)
如果没有发现任何东西,这听起来像它被阻止别的地方。与您的网络管理员联系。
谢谢你的帮助,这是iptables的问题! – Ildar 2012-08-09 13:36:28