# Web app context for rancher

**URL:** <https://forums.suse.com/t/web-app-context-for-rancher/2309>\
**Category:** Rancher 1.x\
**Created:** [April 4, 2016, 7:16pm UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309 "2016-04-04T19:16:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salimlou](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Salimlou](https://forums.suse.com/u/Salimlou)\
**Post date:** [April 4, 2016, 7:16pm UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/1 "2016-04-04T19:16:45Z")

</div>

Hi all,

First of all thank you for this amazing tool!

I’m using rancher behind nginx, and I want to it to point at [domain.com/rancher](http://domain.com/rancher), here is my configuration :

> ```
> upstream rancher{
> server 192.168.1.110:8080;
> }
> 
> ```

> ```
> server {
> listen 443;
> server_name domain.com;
> 
> ```

> ```
> ssl on;
> ssl_certificate /etc/ssl/certs/fullchain.pem;
> ssl_certificate_key /etc/ssl/certs/privkey.pem;
> 
> ```

> ```
> # ssl_protocols TLSv1.1 TLSv1.2;
> # ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
> # ssl_prefer_server_ciphers on;
> # ssl_session_cache shared:SSL:10m;
> 
> ```

> ```
> # disable any limits to avoid HTTP 413 for large image uploads
> client_max_body_size 0;
> 
> ```

> ```
> # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
> chunked_transfer_encoding on;
> add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
> 
> ```

> ```
> location /rancher/ {
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-Proto $scheme;
> proxy_set_header X-Forwarded-Port $server_port;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_pass http://rancher/;
> proxy_http_version 1.1;
> proxy_set_header Upgrade $http_upgrade;
> proxy_set_header Connection "upgrade";
> # This allows the ability for the execute shell window to remain open for up to 15 minutes. Without this parameter, the default is 1 minute and will automatically close.
> proxy_read_timeout 900s;
> 
> ```

> ```
> }
> }
> server {
> listen 80;
> server_name domain.com;
> return 301 https://$server_name$request_uri;
> }
> 
> ```

now if I go to [domain.com/rancher](http://domain.com/rancher), the login page shows, but all the assets are 404 ([domain.com/assets](http://domain.com/assets) …).

I think this is due to the jetty WebContextPath, it’s set to “/”.

so my question, can we pass an env variable to the container for changing the context path??

Thanks.  
Cheers from Morocco

PS : Sorry for the not so bad english 😄

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [April 5, 2016, 4:57am UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/2 "2016-04-05T04:57:26Z")

</div>

This is not currently supported, the UI assumes it is running from `/`.

---

<div class="post-metadata">

**Author:** ![Salimlou](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Salimlou](https://forums.suse.com/u/Salimlou)\
**Post date:** [April 5, 2016, 10:22am UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/3 "2016-04-05T10:22:24Z")

</div>

Okay, thanks vincent!

---

<div class="post-metadata">

**Author:** ![richardjq](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@richardjq](https://forums.suse.com/u/richardjq)\
**Post date:** [April 19, 2016, 9:04pm UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/4 "2016-04-19T21:04:58Z")

</div>

Is it on the roadmap? I’m working on a Rancher implementation, but this would be pretty essential in a production environment for us.

Thanks.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [April 28, 2016, 5:09pm UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/5 "2016-04-28T17:09:18Z")

</div>

It is not, is there a reason you can’t use a subdomain or another port?

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://forums.suse.com/u/Hugo)\
**Post date:** [August 1, 2016, 3:55pm UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/6 "2016-08-01T15:55:53Z")

</div>

Hello,

I have the same request.

All our application are behind a common URL. Having the choice to configure rancher behind [domain.com/rancher](http://domain.com/rancher) would be great.

Lot of software have this option.  
Having a dedicated domain for rancher can cost money for SSL certificate for exemple.

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://forums.suse.com/u/Hugo)\
**Post date:** [May 9, 2018, 1:25pm UTC](https://forums.suse.com/t/web-app-context-for-rancher/2309/7 "2018-05-09T13:25:37Z")

</div>

Is this supported in rancher 2.0 ?

Thanks
