Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BTSync / BitTorrent Sync behind nginx
# take one
# subdirectory (one server, multiple services)
location /btsync/ {
rewrite ^/btsync/gui(.*) /btsync$1 last;
proxy_pass http://127.0.0.1:8888/gui/;
proxy_redirect /gui/ /btsync/;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# standalone (one server, one service)
location / {
proxy_pass http://127.0.0.1:8888/;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
@mendelgusmao

This comment has been minimized.

Copy link
Owner Author

mendelgusmao commented Aug 14, 2013

Warning: broken since 1.1.69!

@depraved22

This comment has been minimized.

Copy link

depraved22 commented Jun 20, 2014

I changed mine to just use the /gui/ as the root and it works fine:

    # btsync
location /gui/ {
            proxy_pass http://192.168.1.31:38888/gui/;
        proxy_buffering off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
@SJ50

This comment has been minimized.

Copy link

SJ50 commented Aug 15, 2015

I added

location /btsync/ {
         rewrite ^/btsync/gui(.*) /btsync$1 last;
         proxy_pass http://127.0.0.1:8888/gui/;
         proxy_redirect /gui/ /btsync/;
         proxy_buffering off;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
}

location /gui/ {
        proxy_pass http://127.0.0.1:8888/gui/;
        proxy_buffering off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }

I can open btsync with http://ip:port/btsync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.