Setup With Nginx Proxy


sizzledizzle

Recommended Posts

I've encountered this post that kind of explains a workaround.

http://forum.bittorrent.com/topic/31556-bug-with-fix-webuijs-has-hard-coded-absolute-url/?hl=nginx#entry107204

 

However, is there an update where I can get this to work? 

 

My current nginx setup is :

 

server {
        listen 80;
        server_name "LINK";
        root /var/www;
        
        return 301 https://$server_name$request_uri;
        
        index index.html index.php index.htm;
        
        location / {
               try_files $uri $uri/ =404;
        }
 
        location ~ /\.ht {
                deny all;
        }
}
 
server {
        listen 443 ssl;
 
        server_name "LINK";
        root /var/www;
        index index.html index.php index.htm;
 
        ssl_certificate /etc/ssl/"LINK"/"LINK"_bundle.crt;
        ssl_certificate_key /etc/ssl/"LINK"/"LINK".key;
        ssl_session_timeout 5m;
        
        location / {
               try_files $uri $uri/ =404;
        }
 
        include /etc/nginx/sites-available/btsync-loc;
 
        location ~ /\.ht {
                deny all;
        }
 
}
 
and my proxy file is 
 
location /gui/ {
       proxy_pass http://127.0.0.1:8888/gui;
       proxy_redirect https://$host:8888/gui /gui/;
}
 
 
Is there something I'm missing? I can get it to work with other apps but can't seem to figure it out here.
 
Any guidance would be appreciated!
 
Thanks!

 

Link to comment
Share on other sites

  • 2 weeks later...

My workaround for proxying a subfolder to BitTorrent Sync:

        location /MY_SYNC_PATH/ {
                proxy_pass http://127.0.0.1:8004/;
                proxy_redirect / /MY_SYNC_PATH/;
                subs_filter_types text/javascript;
                subs_filter 'urlBase=""' 'urlBase="/MY_SYNC_PATH"' o;
        }

i.e. have nginx rewrite the offending line of JavaScript on the fly.  This might be slightly brittle, if something changes in a future version...

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.