重装了LNMP1.0三次nginx还是出问题
不知道是不是LNMP1.0安装包有问题,还是阿里云的CentOS release 5.4 (Final) 系统问题。我重装了3次LNMP环境,添加了一个网站(只绑定带WWW和不带WWW的域名)。然后重启nginx都提示以下错误:Restarting nginx daemon: nginxnginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
查看了80端口结果如下
lsof -i :80
COMMANDPID USER FD TYPE DEVICE SIZE NODE NAME
nginx 1551 root 7uIPv4 3998 TCP *:http (LISTEN)
nginx 1552www 7uIPv4 3998 TCP *:http (LISTEN) 军哥,我的这个情况群里的一位朋友给帮忙解决了,下面这段代码是添加网站后的默认配置文件,军哥看一下
log_format域名.com'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80;
server_name 域名.com www.域名.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/xunwuwang.com;
include xunwuwang.com.conf;
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log/home/wwwlogs/xunwuwang.com.log 域名.com;
}
页:
[1]