| 1 |
limit_req_zone $binary_remote_addr zone=aercbot:1m rate=1r/s; |
| 2 |
|
| 3 |
server { |
| 4 |
listen 443 ssl; |
| 5 |
listen [::]:443 ssl; |
| 6 |
server_name bot.diabeteman.com; |
| 7 |
|
| 8 |
ssl_certificate /etc/dehydrated/certs/diabeteman.com/fullchain.pem; |
| 9 |
ssl_certificate_key /etc/dehydrated/certs/diabeteman.com/privkey.pem; |
| 10 |
|
| 11 |
client_max_body_size 150K; |
| 12 |
limit_req zone=aercbot burst=10 nodelay; |
| 13 |
|
| 14 |
location / { |
| 15 |
allow 46.23.81.128/25; |
| 16 |
allow 2a03:6000:1813::/48; |
| 17 |
deny all; |
| 18 |
proxy_http_version 1.1; |
| 19 |
proxy_set_header Host $http_host; |
| 20 |
proxy_set_header X-Real-IP $remote_addr; |
| 21 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 22 |
proxy_set_header X-Forwarded-Proto $scheme; |
| 23 |
proxy_redirect off; |
| 24 |
proxy_buffering off; |
| 25 |
proxy_request_buffering off; |
| 26 |
proxy_pass http://127.0.0.1:7777; |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
server { |
| 31 |
listen 80; |
| 32 |
listen [::]:80; |
| 33 |
server_name bot.diabeteman.com; |
| 34 |
return 301 https://$host$request_uri; |
| 35 |
} |