站点 ip 突然打不开,求助大家:
目前 /usr/local/openresty/nginx/logs/error.log
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
然后我执行了:# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 809/nginx: master p
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 723/sshd
tcp 0 36 139.162.219.238:22 113.118.253.249:6991 ESTABLISHED 1526/sshd: root@pts
tcp 0 0 139.162.219.238:22 113.118.253.249:5682 ESTABLISHED 1701/sshd: root@not
tcp 0 0 139.162.219.238:22 113.118.253.249:6658 ESTABLISHED 1450/sshd: root@not
tcp 0 0 139.162.219.238:22 113.118.253.249:6492 ESTABLISHED 1407/sshd: root@pts
tcp 0 0 139.162.219.238:22 113.118.253.249:5817 ESTABLISHED 1211/sshd: root@pts
tcp6 0 0 :::9000 :::* LISTEN 724/php-fpm: master
tcp6 0 0 :::3306 :::* LISTEN 941/mysqld
tcp6 0 0 :::22 :::* LISTEN 723/sshd
端口被占用了吗这是?按照 google 的教程,尝试 killall -9 nginx 重启依然照旧!
贴出自己的 nginx.conf:
user root;
worker_processes 1;
#error_log logs/error.log;
error_log logs/error.log debug;
#error_log logs/error.log info;
pid logs/nginx.pid;
events { worker_connections 1024; }
http { include mime.types; default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
#WAF
lua_shared_dict limit 50m;
lua_package_path "/usr/local/openresty/nginx/conf/waf/?.lua";
init_by_lua_file "/usr/local/openresty/nginx/conf/waf/init.lua";
access_by_lua_file "/usr/local/openresty/nginx/conf/waf/access.lua";
server {
listen 80;
listen [::]:80 ipv6only=on default_server;
server_name 139.162.219.238;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.php index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
1
kmdd33 OP sudo fuser -k 80/tcp 尝试执行这个命令:
sudo: fuser: command not found |
2
0312birdzhang 2018-07-01 13:36:54 +08:00 via iPhone
这是我看到你发的第三个贴子了...
|
3
kmdd33 OP @0312birdzhang 解决了,谢谢
|