Skip to content

Instantly share code, notes, and snippets.

@Jontes-Tech
Created July 27, 2023 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jontes-Tech/47af23acda3e85b749ec62eb801ad64c to your computer and use it in GitHub Desktop.
Save Jontes-Tech/47af23acda3e85b749ec62eb801ad64c to your computer and use it in GitHub Desktop.
proxy_cache_path /mnt/expansion/birdcache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m;
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=1r/s;
server {
access_log /var/log/nginx/birdbox.access.log;
error_log /var/log/nginx/birdbox.error.log;
listen 4443 ssl;
server_name birdbox.jontes.page;
ssl_certificate /etc/letsencrypt/live/birdbox.jontes.page/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/birdbox.jontes.page/privkey.pem;
proxy_buffering off;
location / {
proxy_pass http://192.168.50.203:8000/;
proxy_set_header Host $host;
limit_req zone=mylimit;
proxy_cache my_cache;
proxy_cache_valid 200 5s;
proxy_cache_use_stale updating;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment