我只是在Fedora 14(yum install nginx)上做了一个新的nginx安装,并configuration了以下服务器包含:
server { listen 80; root /var/www/html/test; server_name testserver.turnleftllc.com; location / { index index.htm; } } ps aux | grep nginx root 1986 0.0 0.7 98056 1952 ? Ss 18:55 0:00 nginx: master process /usr/sbin/nginx root 1987 0.0 1.0 98584 2656 ? S 18:55 0:00 nginx: worker process
但是,当我的浏览器指向该域名,它只是挂起,然后回来“无法连接…”
/ var / www / html中所有内容的权限设置为775.我在另一台服务器上运行nginx很长一段时间,从来没有遇到过这个问题。 过去总是很容易的。 有什么想法造成这个?
我敢肯定,这是很明显的,当我弄清楚它是什么的时候,我会觉得自己像个白痴。
[root@resolution ~]# iptables -L -n -v Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 3051 243K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 2 96 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 139 7251 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT 2610 packets, 341K bytes) pkts bytes target prot opt in out source destination [root@resolution ~]# lsof -i -P | grep :80 nginx 1986 root 7u IPv4 9807 0t0 TCP *:80 (LISTEN) nginx 1987 root 7u IPv4 9807 0t0 TCP *:80 (LISTEN)
想到两个假设。
首先,这个名字parsing不起作用。 你可以在客户端上做一个dig testserver.turnleftllc.com (或者OS等价的,如果客户端没有运行linux)并且确认返回了nginx服务器的IP地址?
其次,F14盒子是防火墙。 你可以在F14服务器上做一个iptables -L -n -v ,并将结果作为上面的编辑发布?
这并不是说这个问题与这个问题有任何关系,但是我可以温柔地提醒你,F14现在已经不受支持了,你不应该想到在它上面部署任何一种生产系统?