# How to insert an alias into apache ood-portal.conf?

**URL:** <https://discourse.openondemand.org/t/how-to-insert-an-alias-into-apache-ood-portal-conf/2259>\
**Category:** Get Help\
**Tags:** ondemand2\
**Created:** [September 1, 2022, 2:32am UTC](https://discourse.openondemand.org/t/how-to-insert-an-alias-into-apache-ood-portal-conf/2259 "2022-09-01T02:32:19Z")\
**Posts on this page:** 3\
**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:** [September 1, 2022, 2:32am UTC](https://discourse.openondemand.org/t/how-to-insert-an-alias-into-apache-ood-portal-conf/2259/1 "2022-09-01T02:32:19Z")

</div>

What I need looks like this:

```auto
Alias /shibboleth-ds /srv/www/unity-discovery-service/eds
  <Location "/pun">
    AuthType shibboleth
    ShibRequestSetting requireSession 1
    ShibRequestSetting discoveryURL https://my.domain/shibboleth-ds
    RequestHeader edit* Cookie "(^_shibsession_[^;]*(;\s*)?|;\s*_shibsession_[^;]*)" ""
    RequestHeader unset Cookie "expr=-z %{req:Cookie}"
    Require valid-user
  </Location>

```

but I can’t put an alias within the `auth` section in my ood\_portal.yml because it ends up inside the `<Location>` tag and that’s not a valid apache conf.  
I can add it manually into ood-portal.conf but,

```auto
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !! !!
# !! DO NOT EDIT THIS FILE !!
# !! !!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

```

Is there a way to tell my ood\_portal.yml to add custom lines to the apache conf?  
I tried putting this line in another conf-enabled but that didn’t work.

Alternatively, as I’m not very familiar with apache, is there a way to avoid using this alias?

---

<div class="post-metadata">

**Author:** ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)\
**Post date:** [September 1, 2022, 2:40pm UTC](https://discourse.openondemand.org/t/how-to-insert-an-alias-into-apache-ood-portal-conf/2259/2 "2022-09-01T14:40:37Z")

</div>

Hi and thanks for posting!

There is a way to do this using the `ssl` option in the `ood_portal.yml`:

[https://osc.github.io/ood-documentation/develop/reference/files/ood-portal-yml.html?highlight=ssl](https://osc.github.io/ood-documentation/develop/reference/files/ood-portal-yml.html?highlight=ssl)

Because this option will just take a list of what you feed it, you can list the settings you want under the `ssl` section and it will be pulled into the correct location directive when the conf is built.

---

<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:** [February 28, 2023, 2:41pm UTC](https://discourse.openondemand.org/t/how-to-insert-an-alias-into-apache-ood-portal-conf/2259/3 "2023-02-28T14:41:26Z")

</div>

Closed on February 28, 2023, 2:41pm UTC

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