我正在尝试安装和配置nginx来执行php文件,我安装了php,并且一切正常,除了现在我的节点应用程序给我EADDRINUSE port: 443
错误说我以前使用的我的节点服务器的端口现在很忙。
我试图使用443
记录使用端口lsof -i tcp:443
的服务(我想这些是服务),结果是:我试图用
kill -9 PID
杀死它们,但后来它们又回来了,如果我重新加载该站点,它们会变得更多。
所以我的问题是这些实际上是什么,我该如何制止这种疯狂?
我的Nginx配置:
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name 45.76.***.10;
root /srv/main/site;
index index.html index.php;
ssl_certificate /etc/ssl/certs/mysite.com.pem;
ssl_certificate_key /etc/ssl/private/mysite.com.pem;
ssl_client_certificate /etc/ssl/certs/origin-pull-ca.pem;
ssl_verify_client on;
client_max_body_size 100M;
autoindex off;
location / {
index index.html index.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
使用以下命令杀死正在运行的任务-
sudo kill -9 $(sudo lsof -t -i:443)
您也可以使用-
sudo fuser -k 443/tcp
希望这会有所帮助。