From 66cc8ef26f062bf08971cd0e902d98982c6a5e5b Mon Sep 17 00:00:00 2001 From: hibobmaster <32976627+hibobmaster@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:37:03 +0800 Subject: [PATCH] Add nginx.conf --- nginx.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..d4091b9 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,19 @@ +limit_req_zone $binary_remote_addr zone=ip:10m rate=5r/s; + +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name "Your domain name"; + + # ssl related config + location / { + limit_req zone=ip; + proxy_pass http://127.0.0.1:8080; + proxy_set_header Host $http_host; + 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 $scheme; + } +} \ No newline at end of file