# Configure ood-portal.yml with Mellon Auth to be Reverse Proxied by Nginx

**URL:** <https://discourse.openondemand.org/t/configure-ood-portal-yml-with-mellon-auth-to-be-reverse-proxied-by-nginx/4298>\
**Category:** Get Help\
**Created:** [June 9, 2025, 6:57pm UTC](https://discourse.openondemand.org/t/configure-ood-portal-yml-with-mellon-auth-to-be-reverse-proxied-by-nginx/4298 "2025-06-09T18:57:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasoncunning](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jasoncunning/32/2714_2.png) [@jasoncunning](https://discourse.openondemand.org/u/jasoncunning)\
**Post date:** [June 9, 2025, 6:57pm UTC](https://discourse.openondemand.org/t/configure-ood-portal-yml-with-mellon-auth-to-be-reverse-proxied-by-nginx/4298/1 "2025-06-09T18:57:28Z")

</div>

Hi,

I’m trying to configure ood\_portal.yml for service behind an Nginx reverse proxy. Nginx will be used to terminate ssl and for throttling (eventually). Apache (ood) is running on the same host on a high port (9080).

We’re using Mellon for authorization and in its documentation describing a reverse proxy set up (or being behind a load balancer) it states the necessity of setting UseCanonicalName to On and setting the ServerName complete with scheme (protocol) and port in the following way:

ServerName [https://ood.ucar.edu:443](https://ood.ucar.edu:443)

See: [mod\_auth\_mellon User Guide](https://jdennis.fedorapeople.org/doc/mellon-user-guide/mellon_user_guide.html#deployment_considerations)

What I find when doing this is that the resulting apache configuration for ood contains faulty rewrites that assume the ServerName is just set to the host and the vhost scheme and high port are used:

RewriteRule ^(.\*) [http://https](http://https)://ood.ucar.edu:443:9080$1 [R=301,NE,L]

I’ve noticed when I set the servename = null in ood\_portal.yml the rewrite rules are not included, which confuses me as to their purpose.

Any advise on how to best configure ood\_portal.yml with this set up as a goal? Has anyone attempted a set up like this and had success?

Thanks for any advice!!

Jason

---

<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:** [June 9, 2025, 7:05pm UTC](https://discourse.openondemand.org/t/configure-ood-portal-yml-with-mellon-auth-to-be-reverse-proxied-by-nginx/4298/2 "2025-06-09T19:05:40Z")

</div>

Yea I think `servername` in ood\_portal.yml should just be the hostname then we’ll supply the scheme. All the redirects were a bit before my time, so I’m not 100% sure what they do, but I suspect it’s about ensuring that you can deploy multiple sites behind one apache instance, but if you use the rewrite rules we’ll route anything that’s not specific to OOD instead of any other vhost. I believe there’s a config to turn redirects off.

---

<div class="post-metadata">

**Author:** ![jasoncunning](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jasoncunning/32/2714_2.png) [@jasoncunning](https://discourse.openondemand.org/u/jasoncunning)\
**Post date:** [June 9, 2025, 11:06pm UTC](https://discourse.openondemand.org/t/configure-ood-portal-yml-with-mellon-auth-to-be-reverse-proxied-by-nginx/4298/3 "2025-06-09T23:06:37Z")

</div>

Thanks Jeff, I set

use\_rewrites: false  
servername: [https://ood.ucar.edu:443](https://ood.ucar.edu:443)

and fixed OOD\_ALLOWED\_HOSTS (to be just the host [ood.ucar.edu](http://ood.ucar.edu))

and authentication via Mellon is working and I make it to the dashboard…

---

<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:** [December 6, 2025, 11:07pm UTC](https://discourse.openondemand.org/t/configure-ood-portal-yml-with-mellon-auth-to-be-reverse-proxied-by-nginx/4298/4 "2025-12-06T23:07:13Z")

</div>

Closed on December 6, 2025, 11:07pm UTC

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