{"action":"created","issue":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/663","repository_url":"https://api.github.com/repos/jwilder/nginx-proxy","labels_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/663/labels{/name}","comments_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/663/comments","events_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/663/events","html_url":"https://github.com/jwilder/nginx-proxy/issues/663","id":196770693,"number":663,"title":"Any way to route to something besides a docker container?","user":{"login":"scwood","id":9126138,"avatar_url":"https://avatars2.githubusercontent.com/u/9126138?v=4","gravatar_id":"","url":"https://api.github.com/users/scwood","html_url":"https://github.com/scwood","followers_url":"https://api.github.com/users/scwood/followers","following_url":"https://api.github.com/users/scwood/following{/other_user}","gists_url":"https://api.github.com/users/scwood/gists{/gist_id}","starred_url":"https://api.github.com/users/scwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scwood/subscriptions","organizations_url":"https://api.github.com/users/scwood/orgs","repos_url":"https://api.github.com/users/scwood/repos","events_url":"https://api.github.com/users/scwood/events{/privacy}","received_events_url":"https://api.github.com/users/scwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-20T20:20:29Z","updated_at":"2018-03-28T16:02:21Z","closed_at":null,"author_association":"NONE","body":"I use this project as my main reverse proxy for my server and it works great, but I have something that can't be run inside a docker container that I need to serve traffic to. \r\n\r\nIs there anyway to do this? It's just a simple `sumdomain.domain.com` needs to go to some port on the host server.  "},"comment":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/comments/376941153","html_url":"https://github.com/jwilder/nginx-proxy/issues/663#issuecomment-376941153","issue_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/663","id":376941153,"user":{"login":"senrabdet","id":4489689,"avatar_url":"https://avatars2.githubusercontent.com/u/4489689?v=4","gravatar_id":"","url":"https://api.github.com/users/senrabdet","html_url":"https://github.com/senrabdet","followers_url":"https://api.github.com/users/senrabdet/followers","following_url":"https://api.github.com/users/senrabdet/following{/other_user}","gists_url":"https://api.github.com/users/senrabdet/gists{/gist_id}","starred_url":"https://api.github.com/users/senrabdet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senrabdet/subscriptions","organizations_url":"https://api.github.com/users/senrabdet/orgs","repos_url":"https://api.github.com/users/senrabdet/repos","events_url":"https://api.github.com/users/senrabdet/events{/privacy}","received_events_url":"https://api.github.com/users/senrabdet/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T16:02:21Z","updated_at":"2018-03-28T16:02:21Z","author_association":"NONE","body":"Hi Guys:  I'm hoping based on discussion above to get some help.  I'm trying to use nginx reverse proxy (eventually over ssl) out in front of upstream nginx containers each with a unique subdomain for a web app.  Initially, I'm leaving out the ssl parts,  trying simply to have nginx as reverse proxy aimed at upstream nginx containers with subdomains.  So for initial tests, I'm aiming at being able to go to \"http://subdomain.mydomain.dyndns.org\" to get to each particular upstream instance.  I've assumed I need to load in nginx.conf as a volume (see below) in the reverse-proxy to make this all go, \r\n\r\nWhile I can get to the proxy, I can't get at the subdomain upstream containers (inside or outside my firewall).  Q:  do I need to do something in the hosts file or resov.conf to make subdomains work, or is this all wrong for my use case?  For development purposes, I'm using a dyndns address for now on a home server.  Some of my code:\r\n\r\n1) docker-compose.yml\r\nversion: '3.1'\r\nservices: \r\n  nginx-proxy: \r\n    container_name: nginxproxy\r\n    image: jwilder/nginx-proxy\r\n    ports: \r\n      - \"80:80\"\r\n    dns_search:\r\n      - \"mydomain.dyndns.org\"\r\n    volumes: \r\n      - \"/var/run/docker.sock:/tmp/docker.sock:ro\"\r\n      - \"./nginx.conf:/etc/nginx/nginx.conf\"\r\n  test:\r\n    container_name: test\r\n    image: nginx:latest\r\n    environment:\r\n      - VIRTUAL_HOST=test.mydomain.dyndns.org\r\n\r\n2)  The server block of the nging.conf is:\r\n\r\nserver {\r\n  listen      500 default_server;\r\n  server_name test.mydomain.dyndns.org;\r\n  location /\r\n    proxy_pass       http://192.168.1.99:500;\r\n    proxy_set_header Host 192.168.1.99:500;\r\n  }\r\n}\r\n\r\nupstream main {\r\n  server 192.168.1.99:500;\r\n}\r\n\r\nserver {\r\n  listen      80;\r\n  server_name mydomain.dyndns.org;\r\n \r\n}\r\n \r\n\r\nThe containers start and stay up.  I have tried fiddling with various alternatives in the nginx directives (and tried loading a nginx.conf for the upstream), but consistently connect to the reverse-proxy but not the subdomain.  Thoughts?  Thx!"}}
{"actor":{"display_login":"senrabdet"}}