# 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:** 1

<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,‏ 2:18pm UTC](https://meta.discourse.org/t/how-to-run-discourse-in-apache-vhost-not-nginx/133112/1 "2019-11-11T14:18:14Z")

</div>

Has anyone successfully setup Discourse running on an Apache vhost, instead of the default nginx?

It looks like most of the chatter around apache on these forums is about running Discourse on a host that already runs apache. In every case that I’ve seen, people just proxy apache back to nginx. To be clear: I want the docker backend container running Discourse to run the virtual host in Apache, not Nginx.

Specifically, I’m hoping to run the Discourse backend in Apache instead of Nginx to enable mod\_security. Setting up Nginx with mod\_security requires compiling Nginx from source–a complexity I’d like to avoid.

My current production server is already running several sites (wordpress, mediawiki, etc). We use Nginx to terminate https and do some basic DOS rate limiting → varnish cache → apache backend with mod\_security. If possible, I’d like to keep this architecture for Discourse – with the backend Discourse docker container running Apache with mod\_security, not Nginx.

Has anyone successfully setup Discourse to run in Apache?

---

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