# \[aiuto\] multisito con letsencrypt-nginx-proxy-companion

**URL:** <https://meta.discourse.org/t/help-multisite-with-letsencrypt-nginx-proxy-companion/88192>\
**Category:** Self-hosting\
**Created:** [23 Maggio 2018, 2:15am UTC](https://meta.discourse.org/t/help-multisite-with-letsencrypt-nginx-proxy-companion/88192 "2018-05-23T02:15:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Yule\_Augustine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yule_augustine/32/119951_2.png) [@Yule\_Augustine](https://meta.discourse.org/u/Yule_Augustine)\
**Post date:** [23 Maggio 2018, 2:15am UTC](https://meta.discourse.org/t/help-multisite-with-letsencrypt-nginx-proxy-companion/88192/1 "2018-05-23T02:15:27Z")

</div>

In my app.yml, make these changes:

Only expose port 80:

```plaintext
expose:
- "80" # fwd host port 80 to container port 80 (http)

```

In the `env:` section, add the latter 3 new lines:

```plaintext
  DISCOURSE_HOSTNAME: 'a.com'
  VIRTUAL_HOST: 'a.com'
  LETSENCRYPT_HOST: 'a.com'
  LETSENCRYPT_EMAIL: a@a.com'

```

Then run `./launer rebuild app`

and my docker-compose.yml looks:

```plaintext
version: '2'

services:

  nginx:
    image: nginx
    volumes:
      - "./etc/nginx/conf.d/:/etc/nginx/conf.d/"
    environment:
      VIRTUAL_HOST: a.com
      LETSENCRYPT_HOST: a.com
      LETSENCRYPT_EMAIL: a@a.com

  nginx-proxy:
    image: jwilder/nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "./nginx/vhost.d:/etc/nginx/vhost.d"
      - "./nginx/html:/usr/share/nginx/html"
      - "./nginx/certs:/etc/nginx/certs"
      - "/var/run/docker.sock:/tmp/docker.sock:ro"

  letsencrypt-nginx-proxy-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    volumes_from:
      - "nginx-proxy"

```

Then i run docker-compose up,when i visit `a.com`,i got 502.  
Waitting for help

---

_[View the full topic](https://meta.discourse.org/t/help-multisite-with-letsencrypt-nginx-proxy-companion/88192)._
