Nem Posted January 24, 2018 Share Posted January 24, 2018 Id like to be able to access the unraid webgui via reverse proxy now that unraid 6.4 has letsencrypt SSL certs I'd like to navigate to www.web.com/admin and be able to access the gui, but unraid doesnt have an option for adding a base url Im currently using this: location ^~ /admin { include /config/nginx/proxy.conf; proxy_pass http://192.168.187.10:8181; } unraid isn't expecting to see /admin so nothing loads. Is there a way to add /admin to the target url even though unraid doesnt allow for customizing the base url it uses? Quote Link to comment
ljm42 Posted January 24, 2018 Share Posted January 24, 2018 You may just want to wait, as there are plans in the works: But if you have to set something up today, see below. No guarantees, no warranties Quote Link to comment
Nem Posted January 24, 2018 Author Share Posted January 24, 2018 ah perfect, thanks! ill give that a go, but in the mean time does anyone know if theres a way to use a subdirectory (web.com/admin) rather than a subdomain (admin.web.com)? Quote Link to comment
ljm42 Posted January 24, 2018 Share Posted January 24, 2018 no it is not possible Quote Link to comment
Nem Posted January 24, 2018 Author Share Posted January 24, 2018 actually I think I just figured it out and it seems to work From this stackoverflow answer: https://stackoverflow.com/questions/32542282/how-do-i-rewrite-urls-in-a-proxy-response-in-nginx the key seems to be to keep the trailing slash in the proxy_pass line: `proxy_pass http://192.168.187.10:8181/` . That way the location (/admin) will just be placed by / in the resulting url Quote Link to comment
ljm42 Posted January 26, 2018 Share Posted January 26, 2018 That is pretty interesting, Nginx actually rewrites html on the fly to use the subdirectory. I can see how that would work for a static site, but I don't see how it could account for all the ways that javascript might construct urls. Personally, I wouldn't feel comfortable using that feature on the unRAID webgui, if it misses something the effects could be severe. Quote Link to comment
Recommended Posts
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.