Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tracyhatemice/e64bc9cc5a7fcf8146c98927ba1b3d5e to your computer and use it in GitHub Desktop.
Save tracyhatemice/e64bc9cc5a7fcf8146c98927ba1b3d5e to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment