# Problem redirecting http to https

**URL:** <https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649>\
**Category:** Get Help\
**Tags:** question\
**Created:** [April 20, 2023, 10:25am UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649 "2023-04-20T10:25:13Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![juanca-uca](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/juanca-uca/32/1617_2.png) [@juanca-uca](https://discourse.openondemand.org/u/juanca-uca)\
**Post date:** [April 20, 2023, 10:25am UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/1 "2023-04-20T10:25:13Z")

</div>

Hello everybody,  
I’ve recently installed OOD over a Rocky Linux 8.6 and configured /etc/ood/config/ood\_portal.yml to point to my certificates like this:

servername: webfrontal.uca.es  
ssl:

- ‘SSLCertificateFile “/etc/pki/tls/certs/webfrontal.uca.es.pem”’
- ‘SSLCertificateKeyFile “/etc/pki/tls/private/webfrontal.uca.es.key”’
- ‘SSLCertificateChainFile “/etc/pki/tls/certs/Sectigo.pem”’

and restarted Apache services.  
But the portal still does not redirect http to https. Need I some more configuration?  
OOD version: 3.0.0  
Thanks in advance.

---

<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:** [April 20, 2023, 1:30pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/2 "2023-04-20T13:30:38Z")

</div>

Hello and welcome!

> [@juanca-uca](#):
>
> and restarted Apache services.

Did you run the `update_ood_portal` command before the restart of apache?

---

<div class="post-metadata">

**Author:** ![juanca-uca](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/juanca-uca/32/1617_2.png) [@juanca-uca](https://discourse.openondemand.org/u/juanca-uca)\
**Post date:** [April 20, 2023, 3:03pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/3 "2023-04-20T15:03:10Z")

</div>

I did it without result. But now I’ve rebooted the whole computer and it seems to work now.  
Although now I’m getting a 500 error which I’ll have to look into.  
Thanks for your help.

---

<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:** [April 20, 2023, 3:18pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/4 "2023-04-20T15:18:49Z")

</div>

Ok. In the future just remember to run that command each time you make a change to the `ood_portal.yml` so that the values you set there can be written to the correct config files for apache and your auth, and then do the restarts for apache and ood.

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 20, 2023, 3:33pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/5 "2023-07-20T15:33:04Z")

</div>

Hi Folks,

I have this same exact issue. Base Install on RHEL9.

`http://fqdn` redirects to `http://fqdn/public/need_auth.html`

The only changes I’ve made to `/etc/ood/config/ood_portal.yml` is add the following :

```auto
servername: fqdn
ssl:
  - 'SSLCertificateFile "/etc/pki/tls/certs/fqdn.cert"'
  - 'SSLCertificateKeyFile "/etc/pki/tls/private/fqdn.key"'
  - 'SSLCertificateChainFile "/etc/pki/tls/certs/fqdn-interm.crt"'

```

Every time I run `update_ood_portal`, it says no change in Apache config. I’ve tried restarting httpd anyway to no vail.

```auto
[root@fqdn config]# /opt/ood/ood-portal-generator/sbin/update_ood_portal
No change in Apache config.
Completed successfully!

```

Edit:  
`https://fqdn` takes me to the RHEL-Apache test page.

Thanks in advance!

---

<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:** [July 20, 2023, 3:49pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/6 "2023-07-20T15:49:01Z")

</div>

Do you get the same working state after rebooting the actual machine like @juanca-uca above?

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 20, 2023, 4:00pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/7 "2023-07-20T16:00:03Z")

</div>

There was no change in the behavior, even after a reboot.

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 20, 2023, 4:24pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/8 "2023-07-20T16:24:53Z")

</div>

I.e. it just takes me to the landing page that says “Welcome to Open OnDemand!” :

```auto
You have successfully installed Open OnDemand. 

However, you now have to configurure authentication for this apache instance. See the authentication documentation for all the options available.

```

---

<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:** [July 20, 2023, 4:38pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/9 "2023-07-20T16:38:02Z")

</div>

Is it using `https` to connect to that page it shows you or is it still `http`? I’m trying to understand if the SSL is working but you just need to set the authentication up.

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 20, 2023, 4:46pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/10 "2023-07-20T16:46:11Z")

</div>

It is still using http. I have yet to set up auth. I was following the docs and I was unable to get http to redirect to https.

---

<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:** [July 20, 2023, 4:59pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/11 "2023-07-20T16:59:34Z")

</div>

Ok, i’m going to have to dig into this deeper on my side as something doesn’t seem right. I had to reboot my ubuntu install at this step for things to work (which shouldn’t be needed and isn’t documented) and now I’m about to walk through with RHEL 9 and see what happens.

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 20, 2023, 5:01pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/12 "2023-07-20T17:01:56Z")

</div>

Thanks for the help, I will let you know if I make any headway into this.

---

<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:** [July 20, 2023, 5:43pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/13 "2023-07-20T17:43:47Z")

</div>

So, it could be the docs are just organized poorly. I’m being told that if you setup your authentication, then this redirect should stop and the https will work…

I’m still going to walk through this because something seems off with what we are asking users to do, and what they are seeing, and what is actually assumed you have completed at various steps because it seems like this assumes auth is steup, yet auth is the next step.

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 20, 2023, 6:15pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/14 "2023-07-20T18:15:05Z")

</div>

Ok, I will continue setting up authentication and get back to you.

---

<div class="post-metadata">

**Author:** ![hiteesh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hiteesh/32/1768_2.png) [@hiteesh](https://discourse.openondemand.org/u/hiteesh)\
**Post date:** [July 21, 2023, 3:57pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/15 "2023-07-21T15:57:25Z")

</div>

You were spot on. Once I setup Auth, https started working.

Thanks for the help!

---

<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:** [July 21, 2023, 4:29pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/16 "2023-07-21T16:29:12Z")

</div>

Great! I think we are still going to do some rearrangement of that section of the docs to make the instructions flow a little cleaner so you don’t have to jump steps to do the auth after this.

---

<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 17, 2024, 4:29pm UTC](https://discourse.openondemand.org/t/problem-redirecting-http-to-https/2649/17 "2024-01-17T16:29:54Z")

</div>

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