- 论坛徽章:
- 0
|
我的环境是linux as4.7 64位机器 安装nginx0.7.17版本
安装好之后我把原来的配置文件复制过来 当然端口都是80
之后启动nginx;
nginx_error.log报错 说
2010/01/24 11:38:10 [emerg] 28798#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/01/24 11:38:10 [emerg] 28798#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/01/24 11:38:10 [emerg] 28798#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/01/24 11:38:10 [emerg] 28798#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2010/01/24 11:38:10 [emerg] 28798#0: still could not bind()
于是我删除掉 rpm -e httpd ,并删除与httpd所有依赖关系包
之后再重启nginx
nginx_error.log没有报错
但是我自己做测试并不能访问 http://IP:80
说网站正在建设中。。。
如果我要是把配置文件中的端口改成81 便可以访问到 http://IP:81
运用命令
[root@load nginx]# netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:872 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
在运行命令nmap -sS -v 127.0.0.1
(The 1653 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
81/tcp open hosts2-ns
111/tcp open rpcbind
631/tcp open ipp
872/tcp open unknown
但是,我之前在这个机器上安装过一个源代码的apache 安装在/usr/local/apache
我已经停掉了apache 并把apache的端口改成8888 。。
我的请求还是不能正常访问到80端口这事怎么回事啊
在线等!!谢谢先!! |
|