# Would Discourse/Docker work on Nginx without a plethora of work?

**URL:** https://meta.discourse.org/t/would-discourse-docker-work-on-nginx-without-a-plethora-of-work/20972
**Category:** Self-hosting
**Tags:** hosting
**Created:** [October 9, 2014, 5:49pm UTC](https://meta.discourse.org/t/would-discourse-docker-work-on-nginx-without-a-plethora-of-work/20972 "2014-10-09T17:49:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![stianthedark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stianthedark/32/35362_2.png) [@stianthedark](https://meta.discourse.org/u/stianthedark)
#### Post date: [October 9, 2014, 5:49pm UTC](https://meta.discourse.org/t/would-discourse-docker-work-on-nginx-without-a-plethora-of-work/20972/1 "2014-10-09T17:49:24Z")

</div>

I think it would work. but it would probably require a ton of work. Does anyone have a simple way? Or should I just give up on hosting it myself? I would love to, as I have made my old laptop into a web server. It runs Lubuntu with Nginx installed. Does anyone have experience with this at all? Thanks!

---

<div class="post-metadata">

### Author: ![kuchaev\_iv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuchaev_iv/32/114921_2.png) [@kuchaev\_iv](https://meta.discourse.org/u/kuchaev_iv)
#### Post date: [October 9, 2014, 5:54pm UTC](https://meta.discourse.org/t/would-discourse-docker-work-on-nginx-without-a-plethora-of-work/20972/2 "2014-10-09T17:54:56Z")

</div>

Just change the Docker port at app.yml:

```
## which TCP/IP ports should this container expose?
expose:
  - "8080:80" # fwd host port 80 to container port 80 (http)
  - "2222:22" # fwd host port 2222 to container port 22 (ssh)

```

and configure the proxy on Nginx:

```
server {
        listen 80;

        server_name example.com;

        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;

            proxy_pass http://127.0.0.1:8080/;
        }

}

```

---

<div class="post-metadata">

### Author: ![stianthedark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stianthedark/32/35362_2.png) [@stianthedark](https://meta.discourse.org/u/stianthedark)
#### Post date: [October 11, 2014, 5:51pm UTC](https://meta.discourse.org/t/would-discourse-docker-work-on-nginx-without-a-plethora-of-work/20972/3 "2014-10-11T17:51:51Z")

</div>

Thanks a lot @kuchaev_iv! Really new to web servers you see 🙂
