nginx reverse proxy: dynamix (and maybe stock unraid gui?)


Recommended Posts

i've been playing with this on and off without much luck but i finally got it working i think and in my searching i found some posts without much information so i thought i'd provide this to others.

 

location /lime {
        proxy_pass http://tower:80/;
    }
    location / {
        proxy_pass https://server/lime/;
    }

 

with just location /lime the links, images and css wouldn't work until i set / to look back to /lime essentially. it's working for me for the most part. the only issue is since i'm using location / i can't use my default /index.html anymore.. any ideas?

 

Link to comment
  • 3 months later...

for anyone else trying to do this, i kinda got something "working". it looks like it works but it's basically read only, most of the action buttons don't really do anything. please advise if you know how to get this working!

 

        location /unraid/ { proxy_pass http://tower/; }

        location /webGui/ { proxy_pass http://tower/webGui/; }

        location /plugins/ { proxy_pass http://tower/plugins/; }

        location /state/ { proxy_pass http://tower/state/; }

        location /Dashboard/ { proxy_pass http://tower/Dashboard/; }

        location /Main/ { proxy_pass http://tower/Main/; }

        location /Shares/ { proxy_pass http://tower/Shares/; }

        location /Users/ { proxy_pass http://tower/Users/; }

        location /Settings/ { proxy_pass http://tower/Settings;  }

        location /Plugins/ { proxy_pass http://tower/Plugins/; }

        location /Docker/ { proxy_pass http://tower/Docker/; }

        location /Tools/ { proxy_pass http://tower/Tools/; }

 

Link to comment

for anyone else trying to do this, i kinda got something "working". it looks like it works but it's basically read only, most of the action buttons don't really do anything. please advise if you know how to get this working!

 

        location /unraid/ { proxy_pass http://tower/; }

        location /webGui/ { proxy_pass http://tower/webGui/; }

        location /plugins/ { proxy_pass http://tower/plugins/; }

        location /state/ { proxy_pass http://tower/state/; }

        location /Dashboard/ { proxy_pass http://tower/Dashboard/; }

        location /Main/ { proxy_pass http://tower/Main/; }

        location /Shares/ { proxy_pass http://tower/Shares/; }

        location /Users/ { proxy_pass http://tower/Users/; }

        location /Settings/ { proxy_pass http://tower/Settings;  }

        location /Plugins/ { proxy_pass http://tower/Plugins/; }

        location /Docker/ { proxy_pass http://tower/Docker/; }

        location /Tools/ { proxy_pass http://tower/Tools/; }

 

Read-only for me as well, using an apache version.

 

EDIT: Found the problem.  Commands are sent via /update.php page.  Trying to figure out how to proxypass just that page.

Link to comment

for anyone else trying to do this, i kinda got something "working". it looks like it works but it's basically read only, most of the action buttons don't really do anything. please advise if you know how to get this working!

 

        location /unraid/ { proxy_pass http://tower/; }

        location /webGui/ { proxy_pass http://tower/webGui/; }

        location /plugins/ { proxy_pass http://tower/plugins/; }

        location /state/ { proxy_pass http://tower/state/; }

        location /Dashboard/ { proxy_pass http://tower/Dashboard/; }

        location /Main/ { proxy_pass http://tower/Main/; }

        location /Shares/ { proxy_pass http://tower/Shares/; }

        location /Users/ { proxy_pass http://tower/Users/; }

        location /Settings/ { proxy_pass http://tower/Settings;  }

        location /Plugins/ { proxy_pass http://tower/Plugins/; }

        location /Docker/ { proxy_pass http://tower/Docker/; }

        location /Tools/ { proxy_pass http://tower/Tools/; }

 

Read-only for me as well, using an apache version.

 

EDIT: Found the problem.  Commands are sent via /update.php page.  Trying to figure out how to proxypass just that page.

 

I stuck it on a subdomain.  http://unraid.domain.com.  Since the /update.php was on root, it was breaking everything else.  I added this in the subdomain        location / { proxy_pass http://tower/; }

Link to comment
  • 4 months later...

for anyone else trying to do this, i kinda got something "working". it looks like it works but it's basically read only, most of the action buttons don't really do anything. please advise if you know how to get this working!

 

        location /unraid/ { proxy_pass http://tower/; }

        location /webGui/ { proxy_pass http://tower/webGui/; }

        location /plugins/ { proxy_pass http://tower/plugins/; }

        location /state/ { proxy_pass http://tower/state/; }

        location /Dashboard/ { proxy_pass http://tower/Dashboard/; }

        location /Main/ { proxy_pass http://tower/Main/; }

        location /Shares/ { proxy_pass http://tower/Shares/; }

        location /Users/ { proxy_pass http://tower/Users/; }

        location /Settings/ { proxy_pass http://tower/Settings;  }

        location /Plugins/ { proxy_pass http://tower/Plugins/; }

        location /Docker/ { proxy_pass http://tower/Docker/; }

        location /Tools/ { proxy_pass http://tower/Tools/; }

 

All the above instructions can be simplified into this:

 

location / {
	proxy_pass http://tower;
}

 

And everything is going to work. I understand though that you wanted to slam the web gui under the /unraid subdirectory but it's not going to work because, well, because the web gui hasn't be written in a way that would make it play nicely with a reverse proxy in front of it. All that we can do is TO ASK that the web gui be rewritten with more relative URLs in its code.

 

For the meantime you have to blow a FQDN for unraid alone as smdion suggested, which is not a bad idea in and of itself.

But for these kind of things I would really like to slam all my apps under specific subdirectories like this:

 

        # THIS IS NOT FULLY WORKING. JUST HERE FOR EDUCATIONAL PURPOSES
#location /unraid/ {
#	proxy_pass http://tower/;

#	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_set_header	X-Forwarded-Proto $scheme;
#}

        # THIS IS WORKING 99%
location /transmission/ {
	rewrite ^/transmission(/?)$ /transmission/web/ permanent;

	proxy_pass		http://transmission:9091;
	proxy_pass_header	X-Transmission-Session-Id;

	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_set_header	X-Forwarded-Proto $scheme;
    }

 

Transmission itself has a little problem that I'm still unable to solve but thanks to its unique URI (/transmission/) you can kind of fool it more easily. So this is the config I'm running at the moment (order is important):

 

location /transmission/ {
	rewrite ^/transmission(/?)$ /transmission/web/ permanent;

	proxy_pass		http://transmission:9091;
	proxy_pass_header	X-Transmission-Session-Id;

	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_set_header	X-Forwarded-Proto $scheme;
}

location / {
	proxy_pass		http://tower;

	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_set_header	X-Forwarded-Proto $scheme;
}
}

 

I'm just hoping that one day they will make unRAID more reverse proxy compatible.

Link to comment

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.   Restore formatting

  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.