Skip to content

Instantly share code, notes, and snippets.

@kode54
Created January 6, 2016 03:40
Show Gist options
  • Save kode54/e1ca45a12897e9d9c0ae to your computer and use it in GitHub Desktop.
Save kode54/e1ca45a12897e9d9c0ae to your computer and use it in GitHub Desktop.
limit_req_zone $binary_remote_addr zone=weechat:10m rate=5r/m;
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name ##goeshere##;
include /path/to/ssl_config;
...
location ^~ /weechat {
proxy_pass http://127.0.0.1:9001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 604800;
limit_req zone=weechat burst=1 nodelay;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment