We most likely want to setup proxying for the handling of certificates and avoiding to expose ports.
# Set up brute force protection
limit_req_zone $binary_remote_addr zone=weechat:10m rate=5r/m;
server {
[...] # Your config goes here!
location /weechat {
proxy_pass http://localhost:8000/weechat; # Change the port to your relay's
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # These two lines ensure that the
proxy_set_header Connection "Upgrade"; # a WebSocket is used
proxy_read_timeout 604800; # Prevent idle disconnects
proxy_set_header X-Real-IP $remote_addr; # Let WeeChat see the client's IP
limit_req zone=weechat burst=1 nodelay; # Brute force prevention
}
}
We most likely want to setup proxying for the handling of certificates and avoiding to expose ports.