简体   繁体   中英

Rancher Server Prefix

I'm trying to put a Rancher Server installation behind an Apache proxy server so my Rancher server dashboard will be available at http://myserver.com/my-awesome-rancher

I'm able to route traffic to the Rancher Server container successfully. The issue is since my Rancher server container is proxied behind a URL prefix, the Rancher HTML pages do not know to request links and scripts from the URL prefix "/my-awesome-rancher".

I'm having problems configuring my Rancher server. It does not realize it's being a prefix, and short of modifying all the HTML link and script href tags with the prefix "/my-awesome-rancher/" I really do not know what to do. I've been reading the official Rancher documentation for the last 3 hours and have found nothing.

I find it hard to believe no-one has wanted to put Rancher behind a URL prefix. This has to be a common thing! I've set up Jenkins, and in the /etc/defaults/jenkins file ther is the "JENKINS_ARGS" where adding --prefix=/my-awesome-jenkins lets Jenkins know it's behind a prefix. What's the Rancher equivalent?

The UI is entirely static files and this is not possible without recompiling it with a different prefix and either repackaging that into the container or hosting it externally (which is described in the readme ).

This is not that common, and is error-prone/less-secure/a generally bad idea for a variety of reasons. Such as the possibility of cookies or localstorage overlapping and breaking things. Or the cookies for one app being sent to all the others and abused. Lack of CORS protection between the apps. Etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM