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

What I need looks like this:

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,

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !!                                    !!
# !!     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?

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

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.

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