解决CentOS5.4下nginx 启动配置都正确却无法看到网页的情况

时间:13-06-09 栏目:问题及解决 作者:admin 评论:0 点击: 8,923 次

在CentOS下,用yum命令安装了nginx,显示成功。安装命令如下:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh  http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

## Remi Dependency on CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh  http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

## CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh  http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

yum --enablerepo=remi,remi-test install nginx

尝试做一些检查,使用命令:

ps -aux|grep nginx

查看nginx进程启动正常

netstat -anp |grep nginx

查看端口侦听也正常。

关闭防火墙:service iptalbes stop 还是打不开。

检查nginx错误日志:

cat /var/log/nginx/error.log

2011/08/27 14:52:42 [emerg] 21997#0: eventfd() failed (38: Function not implemented)
2011/08/27 14:52:42 [alert] 21988#0: worker process 21989 exited with fatal code 2 and can not be respawn

从表面上来看是组件不支持导致nginx子进程启动失败。

经常搜索分析,具体出错原因是:nginx 使用 Linux-native aio 需要 Linux 内核支持,也就是说我的CentOS版本低了。

那么升级 一下CentOS内核版本试下,使用命令:

yum update -y

#查看内核
lsb_release -a

#重启系统
reboot

网站打开正常

 

 

组件不支持导致nginx子进程启动失败。

声明: 本文由( admin )原创编译,转载请保留链接: 解决CentOS5.4下nginx 启动配置都正确却无法看到网页的情况

解决CentOS5.4下nginx 启动配置都正确却无法看到网页的情况:等您坐沙发呢!

发表评论


------====== 本站公告 ======------
联系信息:
电话:19970108113(微信同号) QQ:3142401606
支付宝:https://me.alipay.com/lxq73061
相关插件程序等信息均会在站内发布,敬请关注。

读者排行