有没有大佬配置nginx之后会挂掉的,一开始我使用nginx只配置了siyuan服务的反向代理没出现过异常,后面把siyuan服务去掉了,只配置了halo但现在过一段时间nginx就会挂掉 配置如下有没有大佬帮忙看下
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
error_log /usr/local/nginx/logs/error.log;
access_log /usr/local/nginx/logs/access.log;
server {
listen 19590 ssl;
server_name ttitcc.band:9523;
ssl_certificate ssl/pem.pem;
ssl_certificate_key ssl/key.key;
proxy_intercept_errors on;
error_page 404 /404.html;
error_page 502 /502.html;
location / {
proxy_pass http://192.168.31.194:9523/; # 注意改成你实际使用的端口
rewrite ^/(.*)$ /$1 break;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade-Insecure-Requests 1;
proxy_set_header X-Forwarded-Proto https;
}
location = /404.html {
root /usr/local/nginx/html;
internal;
}
location = /502.html{
root /usr/local/nginx/html;
}
location = /cssc{
root /usr/local/nginx/html;
}
location /js {
root /usr/local/nginx/html;
}
location /css {
root /usr/local/nginx/html;
}
}
}