From 484d85cb45ce533c2ba7c206453c255e7845cec4 Mon Sep 17 00:00:00 2001 From: qy117121 Date: Sun, 5 Feb 2023 11:05:59 +0800 Subject: [PATCH] update --- nginx/misskey.stpl | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/nginx/misskey.stpl b/nginx/misskey.stpl index 0b4e968..069529d 100644 --- a/nginx/misskey.stpl +++ b/nginx/misskey.stpl @@ -19,29 +19,28 @@ server { include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; - client_max_body_size 80m; - + # Change to your upload limit + client_max_body_size 80m; + + # Proxy to Node location / { - proxy_pass http://127.0.0.1:3000; + proxy_pass http://127.0.0.1:3003; proxy_set_header Host $host; proxy_http_version 1.1; proxy_redirect off; + # If it's behind another reverse proxy or CDN, remove the following. + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; # For WebSocket proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; + # Cache settings } - - - location ~ /\.ht {return 404;} - location ~ /\.svn/ {return 404;} - location ~ /\.git/ {return 404;} - location ~ /\.hg/ {return 404;} - location ~ /\.bzr/ {return 404;} - include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; }