title: Multiple docker services to listen on same host and port
body: <p>i am new to nginx and I am not sure is this normal behavior...</p>
  
  <p>Here is the lib I am using: <a href="https://github.com/jwilder/nginx-proxy" rel="nofollow noreferrer">https://github.com/jwilder/nginx-proxy</a></p>
  
  <p>I will explain here what I trying to accomplish... </p>
  
  <p>I have 2 additional services <code>service1</code> and <code>service2</code> those services are simple node.js images with API endpoints</p>
  
  <pre><code>service1 have routes:
  - service1/api/first
  - service1/api/second
  `
  
  `
  service2 have routes:
  - service2/api/third
  - service2/api/fourth
  `
  
  So is possible to be able to access this services from same host, like this:
  localhost/service1/api/first
  localhost/service2/api/third
  ?
  
  I tried like this:
  
  My `docker-compose.yml` file:
  
  
  version: '2'
  services:
    nginx-proxy:
      image: jwilder/nginx-proxy
      container_name: nginx-proxy
      ports:
        - "80:80"
      volumes:
        - /var/run/docker.sock:/tmp/docker.sock:ro
  
    whoami:
      image: jwilder/whoami
      environment:
        - VIRTUAL_HOST=whoami.local
    service1:
      image: mynode:1.1
      volumes:
          - .:/app
      restart: always
      environment:
        - VIRTUAL_HOST=service1.local
        - VIRTUAL_PORT=8080
    service2:
      image: mynodeother:1.2
      volumes:
          - .:/app
      restart: always
      environment:
        - VIRTUAL_HOST=service2.local
        - VIRTUAL_PORT=8081
  </code></pre>
  
  <p>Here is generated config file from command <code>docker exec nginx-proxy cat /etc/nginx/conf.d/default.conf</code>:
  <a href="http://pushsc.com/show/code/58f739790a58d602a0b99d22" rel="nofollow noreferrer">http://pushsc.com/show/code/58f739790a58d602a0b99d22</a></p>
  
  <p>Also when I visit localhost in browser I get: </p>
  
  <blockquote>
    <p>Welcome to nginx!</p>
    
    <p>If you see this page, the nginx web server is successfully installed
    and working. Further configuration is required.</p>
    
    <p>For online documentation and support please refer to nginx.org.
    Commercial support is available at nginx.com.</p>
    
    <p>Thank you for using nginx.</p>
  </blockquote>