# Installing docker on an already running web server?

**URL:** https://meta.discourse.org/t/installing-docker-on-an-already-running-web-server/26308
**Category:** Self-hosting
**Created:** [13 maart 2015 om 20:45 UTC](https://meta.discourse.org/t/installing-docker-on-an-already-running-web-server/26308 "2015-03-13T20:45:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chrisadams](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisadams/32/34106_2.png) [@chrisadams](https://meta.discourse.org/u/chrisadams)
#### Post date: [13 maart 2015 om 20:45 UTC](https://meta.discourse.org/t/installing-docker-on-an-already-running-web-server/26308/1 "2015-03-13T20:45:45Z")

</div>

This is probably a stupid question, but I am unsure and figured I would ask before screwing up something.

I have recently moved hosting companies for the ability to specifically have the option of installing Docker and Discourse. I built a web server on a Ubuntu 14.04 droplet.

If I were to install Docker and Discourse, does it override my current networking setup (index files and apache setup networking, etc..)?

Not sure if this makes sense and I think I am over thinking it and confusing myself, but I want to install it as a sub directory so that when I go to `mydomain.com/discourse` it pulls up.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [13 maart 2015 om 22:10 UTC](https://meta.discourse.org/t/installing-docker-on-an-already-running-web-server/26308/2 "2015-03-13T22:10:47Z")

</div>

> [@chrisadams](#):
>
> (index files and apache setup networking, etc..)?

The recommended setup in this situation is to have nginx running on 80/443 in front, proxying to Discourse and your other sites as needed.

If you can move your PHP files over to `php-fpm` and not have to go through apache, that’ll be a neater setup than nginx → {apache, discourse}.

This topic has more information:

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247):
>
> @pfaffman edited this heavily 2022.02.24. Blame me if it’s broken. If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working. You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…

I would like to heavily recommend against putting apache in front. Without the evented stuff, it’ll fill up the workers with the notification polling.

As for installing in a subdirectory, that existed in a broken form a time ago, then it was ripped out, and there’ve been people asking for it again but it’s tricky due to all the URL generation, and the proxy switching esp. if they’re not on the same machine, and… it’s not available right now.

---

<div class="post-metadata">

### Author: ![chrisadams](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisadams/32/34106_2.png) [@chrisadams](https://meta.discourse.org/u/chrisadams)
#### Post date: [13 maart 2015 om 22:30 UTC](https://meta.discourse.org/t/installing-docker-on-an-already-running-web-server/26308/3 "2015-03-13T22:30:40Z")

</div>

Ahh, that makes sense!

Thank you for the information!
