Add nginx.conf

This commit is contained in:
hibobmaster 2023-08-29 16:37:03 +08:00
parent 36f36c26c7
commit 66cc8ef26f
Signed by: bobmaster
SSH key fingerprint: SHA256:5ZYgd8fg+PcNZNy4SzcSKu5JtqZyBF8kUhY7/k2viDk

19
nginx.conf Normal file
View file

@ -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;
}
}