{"action":"created","issue":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/554","repository_url":"https://api.github.com/repos/jwilder/nginx-proxy","labels_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/554/labels{/name}","comments_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/554/comments","events_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/554/events","html_url":"https://github.com/jwilder/nginx-proxy/issues/554","id":174364609,"number":554,"title":"VIRTUAL_PORT=8080 doesn't work on second container","user":{"login":"Rocks360","id":12479792,"avatar_url":"https://avatars.githubusercontent.com/u/12479792?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocks360","html_url":"https://github.com/Rocks360","followers_url":"https://api.github.com/users/Rocks360/followers","following_url":"https://api.github.com/users/Rocks360/following{/other_user}","gists_url":"https://api.github.com/users/Rocks360/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocks360/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocks360/subscriptions","organizations_url":"https://api.github.com/users/Rocks360/orgs","repos_url":"https://api.github.com/users/Rocks360/repos","events_url":"https://api.github.com/users/Rocks360/events{/privacy}","received_events_url":"https://api.github.com/users/Rocks360/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-31T20:00:57Z","updated_at":"2016-09-01T13:16:13Z","closed_at":null,"body":"Hello, \r\n I have the following two docker-compose.yml files:\r\n\r\n```\r\nversion: '2'\r\nservices:\r\n  nginx-proxy:\r\n    image: jwilder/nginx-proxy\r\n    container_name: nginx-proxy\r\n    ports:\r\n      - \"80:80\"\r\n    volumes:\r\n      - /var/run/docker.sock:/tmp/docker.sock:ro\r\n\r\n  coming-soon:\r\n    image: afrosckick/coming-soon\r\n    container_name: afroschick-coming-soon\r\n    environment:\r\n      - VIRTUAL_HOST=afroschick.de, www.afroschick.de\r\n```\r\nand\r\n```\r\nversion: '2'\r\nservices:\r\n  Jenkins:\r\n    image: Jenkins\r\n    container_name: jenkins\r\n    ports:\r\n      - \"50000:50000\"\r\n    volumes:\r\n      - /var/jenkins_home\r\n    environment:\r\n      - VIRTUAL_PORT=8080\r\n      - VIRTUAL_HOST=jenkins.domain.de, www.domain.de, jenkins.domain.de, www.jenkins.domain.de\r\n```\r\nAfter the \"docker-compose up command in for the two files that are in differed folders located all the docker containers running.\r\n\r\n```\r\nCONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                                NAMES\r\n20e6fa899f94        jenkins                  \"/bin/tini -- /usr/lo\"   10 minutes ago      Up 10 seconds       8080/tcp, 0.0.0.0:50000->50000/tcp   jenkins\r\n91d03f089cfd        jwilder/nginx-proxy      \"/app/docker-entrypoi\"   3 days ago          Up 3 days           0.0.0.0:80->80/tcp, 443/tcp          nginx-proxy\r\n1940ac48ea84        afrosckick/coming-soon   \"httpd-foreground\"       3 days ago          Up 3 days           80/tcp                               afroschick-coming-soon\r\n```\r\n\r\nI get the above output when I run \"docker ps\" command.  But the jenkins container is still not accessible with any of the domains given by the VIRTUAL-HOST environment variable. But the \"afroschick-coming-soon\" container is accessible by its domain dress given by the VIRTUAL-HOST environment variable. Maybe is it a problem that the domains given by the VIRTUAL-HOST environment variable contains letters like ä,ü ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/comments/244075060","html_url":"https://github.com/jwilder/nginx-proxy/issues/554#issuecomment-244075060","issue_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/554","id":244075060,"user":{"login":"Rocks360","id":12479792,"avatar_url":"https://avatars.githubusercontent.com/u/12479792?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocks360","html_url":"https://github.com/Rocks360","followers_url":"https://api.github.com/users/Rocks360/followers","following_url":"https://api.github.com/users/Rocks360/following{/other_user}","gists_url":"https://api.github.com/users/Rocks360/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocks360/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocks360/subscriptions","organizations_url":"https://api.github.com/users/Rocks360/orgs","repos_url":"https://api.github.com/users/Rocks360/repos","events_url":"https://api.github.com/users/Rocks360/events{/privacy}","received_events_url":"https://api.github.com/users/Rocks360/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T13:16:13Z","updated_at":"2016-09-01T13:16:13Z","body":"sure. Here it is:\r\n```\r\n# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the\r\n# scheme used to connect to this server\r\nmap $http_x_forwarded_proto $proxy_x_forwarded_proto {\r\n  default $http_x_forwarded_proto;\r\n  ''      $scheme;\r\n}\r\n# If we receive Upgrade, set Connection to \"upgrade\"; otherwise, delete any\r\n# Connection header that may have been passed to this server\r\nmap $http_upgrade $proxy_connection {\r\n  default upgrade;\r\n  '' close;\r\n}\r\ngzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;\r\nlog_format vhost '$host $remote_addr - $remote_user [$time_local] '\r\n                 '\"$request\" $status $body_bytes_sent '\r\n                 '\"$http_referer\" \"$http_user_agent\"';\r\naccess_log off;\r\n# HTTP 1.1 support\r\nproxy_http_version 1.1;\r\nproxy_buffering off;\r\nproxy_set_header Host $http_host;\r\nproxy_set_header Upgrade $http_upgrade;\r\nproxy_set_header Connection $proxy_connection;\r\nproxy_set_header X-Real-IP $remote_addr;\r\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\nproxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;\r\n# Mitigate httpoxy attack (see README for details)\r\nproxy_set_header Proxy \"\";\r\nserver {\r\n\tserver_name _; # This is just an invalid value which will never trigger on a real hostname.\r\n\tlisten 80;\r\n\taccess_log /var/log/nginx/access.log ghost;\r\n\treturn 503;\r\n}\r\nupstream  www.afroschick.de {\r\n\t\t\t\t## Can be connect with \"nginx-proxy\" network\r\n\t\t\t# afroschick-coming-soon\r\n\t\t\tserver 172.18.0.2:80;\r\n}\r\nserver {\r\n\tserver_name  www.afroschick.de;\r\n\tlisten 80 ;\r\n\taccess_log /var/log/nginx/access.log ghost;\r\n\tlocation / {\r\n\t\tproxy_pass http://www.afroschick.de;\r\n\t}\r\n}\r\nupstream  www.jenkins.lünegamestudios.de {\r\n\t\t\t\t## Can be connect with \"nginx-proxy\" network\r\n\t\t\t# Jenkins\r\n\t\t\tserver 172.18.0.4:8080;\r\n}\r\nserver {\r\n\tserver_name  www.jenkins.lünegamestudios.de;\r\n\tlisten 80 ;\r\n\taccess_log /var/log/nginx/access.log ghost;\r\n\tlocation / {\r\n\t\tproxy_pass http://www.jenkins.lünegamestudios.de;\r\n\t}\r\n}\r\nupstream afroschick.de {\r\n\t\t\t\t## Can be connect with \"nginx-proxy\" network\r\n\t\t\t# afroschick-coming-soon\r\n\t\t\tserver 172.18.0.2:80;\r\n}\r\nserver {\r\n\tserver_name afroschick.de;\r\n\tlisten 80 ;\r\n\taccess_log /var/log/nginx/access.log ghost;\r\n\tlocation / {\r\n\t\tproxy_pass http://afroschick.de;\r\n\t}\r\n}\r\nupstream jenkins.lünegamestudios.de {\r\n\t\t\t\t## Can be connect with \"nginx-proxy\" network\r\n\t\t\t# Jenkins\r\n\t\t\tserver 172.18.0.4:8080;\r\n}\r\nserver {\r\n\tserver_name jenkins.lünegamestudios.de;\r\n\tlisten 80 ;\r\n\taccess_log /var/log/nginx/access.log ghost;\r\n\tlocation / {\r\n\t\tproxy_pass http://jenkins.lünegamestudios.de;\r\n\t}\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"Rocks360"}}