# How to change virtual host

**URL:** <https://discourse.openondemand.org/t/how-to-change-virtual-host/739>\
**Category:** Get Help\
**Created:** [February 19, 2020, 11:36pm UTC](https://discourse.openondemand.org/t/how-to-change-virtual-host/739 "2020-02-19T23:36:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rotaugenlaubfrosch](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rotaugenlaubfrosch/32/314_2.png) [@rotaugenlaubfrosch](https://discourse.openondemand.org/u/rotaugenlaubfrosch)\
**Post date:** [February 19, 2020, 11:36pm UTC](https://discourse.openondemand.org/t/how-to-change-virtual-host/739/1 "2020-02-19T23:36:33Z")

</div>

Hi All,  
Is there a way to specify the virtual host in the `<VirtualHost>` section of `/opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf` in `/etc/ood/config/ood_portal.yml`?

We would like to set the virtual host to a static ip address (like `<VirtualHost x.x.x.x:80>`). Since it’s not recommended to change the file `/opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf` directly, how is one supposed to configure that?  
Thanks and best regards

---

<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:** [February 20, 2020, 4:27pm UTC](https://discourse.openondemand.org/t/how-to-change-virtual-host/739/2 "2020-02-20T16:27:24Z")

</div>

I have similar instructions here. Please make backups! That said, in 1.7 you’ll be able to specify the template you’re using so it’s less dangerous. Let us know if you run into issues.

> [@How to add a proxy rule in the ood\_portal.yml file?](https://discourse.openondemand.org/t/how-to-add-a-proxy-rule-in-the-ood-portal-yml-file/488/2):
>
> I don’t think you can by editing the confg yml. We just don’t allow for arbitrary redirect rules, though maybe we should? Most folks modify the resulting /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf when they need to do something like this. But this comes at a price, those edits will not be preserved next time you reconfigure using the ood-portal-generator. So you’d have to add them back every time. So, if you really need to do this, I’d suggest hacking the template it’s created fro…

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:34pm UTC](https://discourse.openondemand.org/t/how-to-change-virtual-host/739/3 "2022-05-26T15:34:53Z")

</div>


