diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..b70acc5 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,22 @@ +limit_req_zone $binary_remote_addr zone=txtdotapi:10m rate=2r/s; + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + server_name txt.dc09.ru; + + location / { + limit_req zone=txtdotapi burst=4; + proxy_pass http://127.0.0.1:8080; + + proxy_set_header Host $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; + } + + location /static/ { + alias /home/txtdot/src/dist/static/; + } +}