我不知道发生了什么。我将工作连接的值加倍,但它仍然返回错误。
server {
server_name xxx.com;
root /var/www/web;
index index.html index.htm index.php;
error_log /var/log/nginx/error.log;
location / {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
proxy_pass http://127.0.0.1:7777;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/xxx.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xxx.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
listen 80;
server_name xxx.com;
return 301 https://$host$request_uri; # managed by Certbot
}
有了这个代码一切正常吗?
错误:
首先是:
worker_connections are not enough
worker_connections are not enough
现在是
27513#0: accept4() failed (24: Too many open files)
27513#0: accept4() failed (24: Too many open files)
27513#0: accept4() failed (24: Too many open files)
27513#0: accept4() failed (24: Too many open files)