Skip to content

Instantly share code, notes, and snippets.

@IcedMango
Created November 18, 2021 10:02
Show Gist options
  • Save IcedMango/9150bc56f8e10906ef37609afb88dcd6 to your computer and use it in GitHub Desktop.
Save IcedMango/9150bc56f8e10906ef37609afb88dcd6 to your computer and use it in GitHub Desktop.
Resilio Sync with nginx reverse proxy - v2.7.2(1375) OK
location /btsync/ {
proxy_pass http://127.0.0.1:8888/gui/;
sub_filter '/gui/token.html' 'token.html';
sub_filter '/gui/' '';
sub_filter_types text/javascript
sub_filter_once off;
proxy_set_header Cookie $http_cookie;
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_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffering off;
}
@IcedMango
Copy link
Author

Nginx should be built with '--with-http_sub_module' to make the filter work.

The problem is that the dev of resilio wrote the absolute path in js.
So the application doesn't care about the subdirectory of Nginx reverse proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment