title: owncloud docker via nginx proxy with lets encrypt
body: <p>I had a running setup of containers for owncloud, jwilder/nginx-proxy and JrCs/docker-letsencrypt-nginx-proxy-companion for my own cloud. Since I couldn't change the settings afterwards to accept larger files than 2MB I tried to set the hole thing up completely new.
  Yet, for some reason I can't even get the standard configuration (without the 2MB limit) working again...
  Could you help me here real quick?</p>
  
  <p>First, I started the nginx-proxy:</p>
  
  <pre><code>docker run -d -p 80:80 -p 443:443 --name MY_PROXY_NAME1 -v /path/to/my/certs:/etc/nginx/certs:ro -v /etc/nginx/vhost.d -v /usr/share/nginx/html -v /var/run/docker.sock:/tmp/docker.sock:ro --label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy jwilder/nginx-proxy
  </code></pre>
  
  <p>Second, I started the lets encrypt companion:</p>
  
  <pre><code>docker run -d --name MY_PROXY_NAME2 -v /path/to/my/certs:/etc/nginx/certs:rw -v /var/run/docker.sock:/var/run/docker.sock:ro --volumes-from MY_PROXY_NAME1 jrcs/letsencrypt-nginx-proxy-companion
  </code></pre>
  
  <p>Checking afterwards, both containers seem to run:</p>
  
  <pre><code>someID        jrcs/letsencrypt-nginx-proxy-companion   "/bin/bash /app/en..."   6 minutes ago        Up 6 minutes                                                           MY_PROXY_NAME2
  someID        jwilder/nginx-proxy                      "/app/docker-entry..."   7 minutes ago        Up 7 minutes        0.0.0.0:80-&gt;80/tcp, 0.0.0.0:443-&gt;443/tcp           MY_PROXY_NAME1
  </code></pre>
  
  <p>But when starting any test container or the owncloud container, the browser simply tells me <em>no secure connection could be established</em>...</p>
  
  <p>Here an example on how I started the owncloud container:</p>
  
  <pre><code>docker run -v /path/to/my/data:/usr/share/webapps/owncloud/data --link mysql:mysql -e "VIRTUAL_HOST=my.domain.com" -e "LETSENCRYPT_HOST=my.domain.com" -e "LETSENCRYPT_EMAIL=my@email.com" --name Owncloud -d --expose 80 --expose 443 owncloud:latest
  </code></pre>
  
  <p>Do you have any ideas why it isn't working? I got furious since I had it running at some point and can't figure out why its not working this time... (if I start the old proxy and owncloud containers I can still reach them, so no network problems or other issues)</p>
  
  <p>So thanks a lot!</p>