Hi Adam,
Thanks for the uplifting words of encouragement!
And I agree with UD seems to fit a specific bill/niche which I fall into. Plus it uses my favorite language/scripting tool so what is not to like? Hence my struggles and endurance.
But it seemed to have paid off! I finally got the ball rolling. There is but one detail I find odd but can livew ith, other then that I can now finally run dashboards behind a reverse proxy in either a PS shell or IIS. Did not yet try to run as a service but that I can try later on.
So here is the deal. I run servers in AWS which are behind a reverse proxy (and if need be behind a load balancer but let’s skip that for now).
I can pick several servers to run UD on and each set of servers has a domain/hostname.
Let me try to sketch a typical route from client call to server:
Client -> Company DNS -> Reverse Proxy -> SSO (SafeNet) -> AWS Server
So my challenge was to use one hostname (www.systemteam.blabla.morebla.company.com) and run an UD behind that. So this would mean “https://www.systemteam.blabla.morebla.company.com/dashboard”
Looks ok and sounds reasonable to me. On the reverse proxy we catch the “www.systemteam.blabla.morebla.company.com” and normally send that to a website on a AWS server. But for the path “/dashboard” I needed to tell the rev proxy to send that request to another server in our cloud. This was a challenge but in hindsight easy. Here it is:
# Redirect UD Dashboard to the UD server
ProxyPass /dashboard http://1.2.3.4:2000
ProxyPassReverse /dashboard http://1.2.3.4:2000
The reverse proxy takes care of SSL and SSO/SafeNet so once you hit those lines, you will have been authenticated and the SSL can be dropped between proxy and UD server (passing onto http as you can see).
I always thought that in order to have the BaseRef set in “<udmodule>\client\index.html” you must host via IIS, this is what all documentation and references from other seem to suggest. Could be me not reading this well but I wanted to mention that this is not needed, you can set that BaseRef and it will affect/apply to you UD hosted in aPS shell as well.
I had to set it to:
<base href="/dashboard/">
Furthermore, I had to either use the “-Name” or “-Url” parameters in the New-UDPage command with the BaseRef included there as well. Something like this:
New-UDPage -Url “/dashboard/home” -Title “This is my homepage” -Endpoint {
New-UDPage -Url "/dashboard/home" -Title "This is my homepage" -Endpoint {
New-UDCard -Title "Home" -Content {
"Welcome, this is my homepage"
}
}
There are some minor details but overall this is what I needed to do and set to get it all working.
And like I said, there is 1 thing which I do not understand but perhaps the people here do and can help with.
If I browse to “https://www.systemteam.blabla.morebla.company.com/dashboard” I get directed to “https://www.systemteam.blabla.morebla.company.com/dashboard/home” as expected but the page/part that should have shown the message “Welcome, this is my homepage” shows “Page Not Found”. However, when I start clicking menu items and whatnot, the URL changes to “https://www.systemteam.blabla.morebla.company.com/dashboard/dashboard/home” or “https://www.systemteam.blabla.morebla.company.com/dashboard/dashboard/servers” and so on, and it all works from there on. So I have a double “dashboard” reference in the URL.
Undoubtedly the consequence of me fooling around with all BaseHref and the likes but if possible, I would like to get rid of that.
FYI: I am running a nightly build to make IE work and get rid of the “Page Not Found” error. Not sure if the “Page Not Found” issue I face is related to that though.
But, overall I have it working and I am thrilled to have passed the hurdle!
Thanks to Adam and all the people here (and articles I could find by UD users here and there) I was able to figure it out. I hope that my little writeup here might help others with the struggle they might face.