Created
November 18, 2021 10:02
-
-
Save IcedMango/9150bc56f8e10906ef37609afb88dcd6 to your computer and use it in GitHub Desktop.
Resilio Sync with nginx reverse proxy - v2.7.2(1375) OK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.