# Issue with Redirection After Login

**URL:** <https://discourse.openondemand.org/t/issue-with-redirection-after-login/4054>\
**Category:** Get Help\
**Tags:** question\
**Created:** [February 18, 2025, 8:06am UTC](https://discourse.openondemand.org/t/issue-with-redirection-after-login/4054 "2025-02-18T08:06:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianmalecki](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/adrianmalecki/32/2207_2.png) [@adrianmalecki](https://discourse.openondemand.org/u/adrianmalecki)\
**Post date:** [February 18, 2025, 8:06am UTC](https://discourse.openondemand.org/t/issue-with-redirection-after-login/4054/1 "2025-02-18T08:06:02Z")

</div>

Hi!  
I have the following issue: I have configured two virtual hosts on a single machine for Open OnDemand:

- `ood-plg.e-science.pl`
- `ood.e-science.pl`

(I understand that having two vhosts on the same machine is not the good solution, but it is temporary and necessary for us at this moment. For a short period of time we need two different methods of authentication)

After logging into `ood-plg.e-science.pl`, users are automatically redirected to `ood.e-science.pl`. From what I can see in the logs and the attached screenshot below, it looks like the address `https://ood-escience.pl:443/pun/sys/dashboard` is set somewhere in the configuration and is forcing the redirection (maybe `localhost` is still set somewhere?):

 ![Zrzut ekranu 2025-02-18 090136](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/8/8d5d4b628aee853b65600a0c3c4ad928d0d5c859.png)

**Question:** Where could this redirection to `https://ood-escience.pl:443/pun/sys/dashboard` be set?  
I have checked the configuration files, but I couldn’t find anything that would enforce such behavior. I also checked server logs but didn’t notice anything suspicious. The SSO and Keycloak configuration is definitely correct.

Could this be set somewhere in redirections, or is it handled in the `pun` backend for the user?  
I have tried various modifications but without success:

- In the `/pun` configuration in Apache, I replaced `localhost` with the server name, but it didn’t help.
- I edited the `nginx_stage` template, but that also had no effect.
- I modified files referenced in the Apache configuration, such as `pun_proxy.lua`, `pun_proxy_handler.lua`, but the issue still persists.
- We have set the OIDC domains and checked all redirect settings, but the redirection issue still occurs.

Is there a specific file I should edit to fix this issue?

I would appreciate any help!

Best regards

---

<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:** [February 18, 2025, 5:46pm UTC](https://discourse.openondemand.org/t/issue-with-redirection-after-login/4054/2 "2025-02-18T17:46:25Z")

</div>

Hi sorry for the trouble.

The redirects for OOD are handled in the `ood_portaly.yml` file. The docs for that can be seen here: [ood\_portal.yml — Open OnDemand 4.0.0 documentation](https://osc.github.io/ood-documentation/latest/reference/files/ood-portal-yml.html)

Have you set anything in `ood_portal.yml` for your `root_uri`? This is the URI a user is redirected to when they access the website root and may be what is causing this.

Also, ensure you follow the steps to ensure changes to the `ood_portal.yml` are propogated: [ood-portal-generator — Open OnDemand 4.0.0 documentation](https://osc.github.io/ood-documentation/latest/reference/commands/ood-portal-generator.html)

---

<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:** [August 17, 2025, 5:47pm UTC](https://discourse.openondemand.org/t/issue-with-redirection-after-login/4054/3 "2025-08-17T17:47:10Z")

</div>

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