# How to run Discourse in Apache vhost, not Nginx

**URL:** <https://meta.discourse.org/t/how-to-run-discourse-in-apache-vhost-not-nginx/133112>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [11 בנובמבר,‏ 2019,‏ 2:18pm UTC](https://meta.discourse.org/t/how-to-run-discourse-in-apache-vhost-not-nginx/133112 "2019-11-11T14:18:14Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![maltfield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maltfield/32/160669_2.png) [@maltfield](https://meta.discourse.org/u/maltfield)\
**Post date:** [11 בנובמבר,‏ 2019,‏ 3:15pm UTC](https://meta.discourse.org/t/how-to-run-discourse-in-apache-vhost-not-nginx/133112/6 "2019-11-11T15:15:42Z")

</div>

> [@pfaffman](#):
>
> No they have not. Discourse is rather tightly connected with nginx. It will be difficult if impossible to replace it with apache. And since you’ll be the only person doing that, no one else will care when it breaks.
> 
> Just use the docker container that everyone on the planet uses and stick apache in front of it if you think that’ll help security somehow.

> [@pfaffman](#):
>
> > EDIT: wait, is nginx _already_ being compiled from source by Discourse?
> 
> It does look like it.

I’d rather not have nginx → varnish → apache → nginx 🙂

To be clear: do you think it would be safer for me to update the ‘[image/base/install-nginx](https://github.com/discourse/discourse_docker/blob/ceffc4433e1bd6fcbd101f2427e17232fc99ab14/image/base/install-nginx)’ script to compile nginx on the Discourse docker container with mod\_security support rather than update the container to run the Discourse vhost behind apache (as opposed to Nginx)? If so, what are the risks of me modifying the `install-nginx` script? How could it break my Discourse install in the future?

---

_[View the full topic](https://meta.discourse.org/t/how-to-run-discourse-in-apache-vhost-not-nginx/133112)._
