From f23d782089e1a088acc824820a2a4246a346affb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Mon, 28 Aug 2023 00:23:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20nginx.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a904889 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,28 @@ +server { + server_name nuclear-data.only4.work; + listen 80; + listen 443 ssl http2; + root /wwwroot/nuclear-data.only4.work/html; + index index.html; + + location /api/ { + proxy_pass http://127.0.0.1:35590/; + proxy_set_header Host $Host:$server_port; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header REMOTE-HOST $remote_addr; + add_header X-Cache $upstream_cache_status; + proxy_set_header X-Host $host:$server_port; + proxy_set_header X-Scheme $scheme; + proxy_connect_timeout 30s; + proxy_read_timeout 86400s; + proxy_send_timeout 30s; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + # 日志 + access_log /wwwlogs/nuclear-data.only4.work.log; + error_log /wwwlogs/nuclear-data.only4.work.error.log; +}