-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move main ui to a sub path (instead of /) #432
Comments
There was a very fruitful discussion in the forum and I think the suggested solution to use virtual domain names is pretty clean and least error-prone. I hence don't think it is worth to put much effort into this issue here, wdyt? |
i agree the virtual domain offers a good solution. However having the ui not using absolute path, or being able to prefix the ui with a path would come handy to many users and render openhab more user friendly. i will find a way to make it work with domains but it might out of reach for many users. |
Hi! I'm working on #710/#964 and Yannick made me aware of this here.
I understand the goal is to have access to all OH services and UIs, combined with e.g. grafana, served from the same (reverse proxy) server. While I agree that having the main UI located under a certain subpath could make life easier for some people, I don't fully understand its requirement here:
I think like this any additional service could be hooked into the OH service. The only thing to take of is to not use subpaths already used by OH (like /rest or /habpanel). What am I missing here? |
Hi, i will comment, from the point of view of my use case. Ideally i would have one domain, forwarding to different backend services including a website, grafana, and openhab, node.js etc. In the end i went for a sub domain for OpenHAB, as i could not figure out all the paths that should be forwared. There is an other aspect that makes that a little difficult in the case of openHAB; authentication. Somehow, the authentication of openHAB collides with the basic auth of Apache (it seems to be easier to handle with nginx). i got it to somehow work so my setup. It works, but it would be so much nicer if openHAB could be configured in a similar way to grafana. that said, i would totally understand it is not an easy thing to acheive. About the two tickets mentioned in your comments, i did noticed that middle clicking some links from the menu would indeed cause some 404 errors, and it seems this would fix it. and maybe fixing these tickets would allow to have configurable base base for openhab ? feel free to hit me if you want to chat about it mots at motscousus.com cheers, Henri |
Thank you, @hdavid, I understand your point. Anyway, the changes in #964 would actually make things even worse for you 😬. I'm going to comment there soon, please follow up there. |
hi @hubsif, you are right, sorry! |
Well, from the title of this issue this would still apply: Since this issue is only about moving mainUI to a subpath, upgrading openHAB could still add new paths, only those added in mainUI wouldn't matter. Though with the change introduced in #964 and mainUI not being subpathed, you'd now have to add a lot of mainUI pathes to the proxy list, since
Which would lead to |
Sorry to bug in but I don't really understand why a sub path is needed when you use a reverse proxy like nginx? server {
listen 80;
location /grafana/ {
proxy_pass http://localhost:3000/; # when 3000 is your grafana port
}
location /oh/ {
proxy_pass http://localhost:8080/; # when 8080 is your OH port
}
location /someotherservice/ {
proxy_pass http://localhost:5000/;
}
} Sorry if i misunderstand the scope of the issue here. |
@DarkC35 However, if the paths requested are absolute, e.g. While what you suggested should currently be possible with openHAB's mainUI pages, it might still not fully work as the UI requests data from the absolute path Now, with the upcoming change in #964, the mainUI will only use absolute paths, with the result that it cannot be remapped (to e.g. |
Hello,
in OH2 the ui was under /paperui/index.html, but now the new ui (which is great by the way) lives at the root (/) of the server. This makes it totally impossible to put openhab behind reverse proxy. a typical use case is : having grafana and openhab on one server, and exposing these services thru apache/nginx.
Could the ui be hosted under a folder of some kind ? for instance /oh/*
Cheers
The text was updated successfully, but these errors were encountered: