# Change the UI colors based on url?

**URL:** <https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513>\
**Category:** Get Help\
**Created:** [March 3, 2023, 7:11pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513 "2023-03-03T19:11:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [March 3, 2023, 7:11pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/1 "2023-03-03T19:11:19Z")

</div>

Our OOD instance is accessed from multiple institutions. I’d like to change the colors of the UI based on which institution’s link was used to access OOD.

Is that possible?  
Perhaps there could be two OOD web servers running on different ports with only one config file changed?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 3, 2023, 9:03pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/2 "2023-03-03T21:03:08Z")

</div>

Not in 2.0, but in 2.1 you’ll be able to style one installation based on the hostname being requested. So 2.1 will respond to multiple hostnames and style itself differently for each hostname based on configuration.

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [March 3, 2023, 9:15pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/3 "2023-03-03T21:15:54Z")

</div>

Is there a rough estimate on when 2.1 might be available?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 3, 2023, 9:21pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/4 "2023-03-03T21:21:48Z")

</div>

Last week I would have told you soon. We have rc8 in production at OSC and we found a critical bug so we had to update. We’re putting rc9 into production on Monday.

It could be next week baring any other show stopping bugs, but I’d say the week after that is not unreasonable.

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [June 20, 2023, 9:58pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/5 "2023-06-20T21:58:08Z")

</div>

I have installed OOD 3.0 and set up hostname profile selection.

In order to get the same OOD portal running under two names, my plan is to copy the apache config and find/replace the ServerName as well as the certificate/private key locations. But I get the feeling that there is a better way. Ideally this could be done in my ood\_portal.yml. Is that possible?

> [@Modifications to the view.rb file to allow multiple ood servers to have an ServerAlias](https://discourse.openondemand.org/t/modifications-to-the-view-rb-file-to-allow-multiple-ood-servers-to-have-an-serveralias/2691/2):
>
> 3.0 supports server aliases, looks like we just forgot to document it. I don’t think I follow number 2, but I see that we do force the value instead of overwriting it. @tdockendorf do you know more about why this may be an issue for HAPorxy environments?

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [June 21, 2023, 5:46pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/6 "2023-06-21T17:46:48Z")

</div>

I added this to my `/etc/ood/config/ood_portal.yml` and ran `/opt/ood/ood-portal-generator/sbin/update_ood_portal`:

```yaml
server_aliases:
- <my-second-domain-name>

```

but then when I visit `<my-second-domain-name>` I get the apache 403 forbidden page:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/8/8abaf0ae0498b5d3ddf83862f12afd9f56881397.png)

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [June 21, 2023, 7:42pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/7 "2023-06-21T19:42:46Z")

</div>

It’s working now, but it doesn’t apply the hostname profile didn’t take effect. I assume these two features were not meant to work together? @jeff.ohrstrom

---

<div class="post-metadata">

**Author:** ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)\
**Post date:** [June 21, 2023, 7:45pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/8 "2023-06-21T19:45:30Z")

</div>

When I tried making a copy of the apache ood-portal.conf, I also got a 403 error.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 5, 2023, 4:47pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/9 "2023-07-05T16:47:28Z")

</div>

> [@simonleary-umass-edu](#):
>
> It’s working now, but it doesn’t apply the hostname profile didn’t take effect. I assume these two features were not meant to work together? @jeff.ohrstrom

They were meant to work with each other, indeed one required the other. Can you reset your instance back to it working and not getting the 403 errors and share your profile configuration?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [January 1, 2024, 4:48pm UTC](https://discourse.openondemand.org/t/change-the-ui-colors-based-on-url/2513/10 "2024-01-01T16:48:25Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
