Apache webserver already running

I have successfully install discourse with docker on a clean install of debian.

I want to get it on to my production webserver. It already hosts a few websites, and it is a pretty beafy server, so I am reluctant to spin up a new machine just for discourse.

I am sure there is an easy solution for this. I have ran into a few posts that deal with nginx. My server is running apach2. Can someone advise me the best way to install discourse on to a webserver already running web sites

many thanks in advance

1 Like
  1. Install Discourse
  2. Change the external port from 80 to another (like 8080)
  3. Make apache reverse proxy to Discourse on port 8080.

It’s easy, create a normal conf file in sites-available, but add this at the end of the server block

        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass /
        ProxyPassReverse /

Then in app.yml change the exposed port





and bootstrap, start


And remember this:


Discourse maintains a lot of open connections!


If you have trouble with this, you can also set up nginx as your frontend server listening on port 80, forwarding requests to either Apache or Discourse. nginx has no problem with maintaining these open connections.

Here’s a tutorial on how to set up the nginx <-> Discourse part:


Hi All

Thanks for all the replies. I will have a look into all of the info given.

I have never used nginx yet, so I may give the other methods a go first.

I currently signed up to Linux Academy, and they have an nginx course on there, so may give that a bash, and see what happens.