{"action":"created","issue":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/596","repository_url":"https://api.github.com/repos/jwilder/nginx-proxy","labels_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/596/comments","events_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/596/events","html_url":"https://github.com/jwilder/nginx-proxy/issues/596","id":181398168,"number":596,"title":"phpMyAdmin not working behind nginx-proxy?  #2002 - php_network_getaddresses","user":{"login":"victor-lund","id":6714401,"avatar_url":"https://avatars.githubusercontent.com/u/6714401?v=3","gravatar_id":"","url":"https://api.github.com/users/victor-lund","html_url":"https://github.com/victor-lund","followers_url":"https://api.github.com/users/victor-lund/followers","following_url":"https://api.github.com/users/victor-lund/following{/other_user}","gists_url":"https://api.github.com/users/victor-lund/gists{/gist_id}","starred_url":"https://api.github.com/users/victor-lund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victor-lund/subscriptions","organizations_url":"https://api.github.com/users/victor-lund/orgs","repos_url":"https://api.github.com/users/victor-lund/repos","events_url":"https://api.github.com/users/victor-lund/events{/privacy}","received_events_url":"https://api.github.com/users/victor-lund/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-06T12:13:35Z","updated_at":"2016-10-10T13:29:31Z","closed_at":null,"body":"I am having problems getting phpMyAdmin working behind the nginx-proxy server and i can't figure out what i am doing wrong.\r\n\r\nMy config files:\r\n\r\n**docker/site/docker-compose.yml**\r\n```\r\nversion: '2'\r\nservices:\r\n  phpmyadmin:\r\n    restart: always\r\n    image: phpmyadmin/phpmyadmin\r\n    links:\r\n      - db\r\n    environment:\r\n      - VIRTUAL_HOST=db.mydomain.com\r\n    networks:\r\n      - nginx-proxy\r\n\r\n  db:\r\n    restart: always\r\n    image: mariadb\r\n    environment:\r\n      MYSQL_ROOT_PASSWORD: asd\r\n      MYSQL_DATABASE: asd\r\n      MYSQL_USER: asd\r\n      MYSQL_PASSWORD: asd\r\n    volumes:\r\n      - ./shared_db_volume:/var/lib/mysql/\r\n\r\n  web:\r\n    image: richarvey/nginx-php-fpm:php7\r\n    container_name: containerc\r\n    environment:\r\n      - VIRTUAL_HOST=test.mydomain.com\r\n    expose:\r\n      - '80'\r\n    volumes:\r\n      - ./html:/var/www/html/\r\n    restart: always\r\n    networks:\r\n      - nginx-proxy\r\n\r\nnetworks:\r\n  nginx-proxy:\r\n    external:\r\n      name: nginx-proxy\r\n```\r\n\r\n**docker/proxy/docker-compose.yml**\r\n```\r\nversion: '2'\r\nservices:\r\n  nginxproxy:\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    networks:\r\n     - nginx-proxy\r\n\r\nnetworks:\r\n  nginx-proxy:\r\n    external:\r\n      name: nginx-proxy\r\n```\r\n\r\nWhen i run this, i can access both the test.mydomain.com and db.mydomain,com without a problem. However - when trying to log in with my login credentials at db.mydomain.com, i get the following issue:\r\n```\r\n #2002 - php_network_getaddresses: getaddrinfo failed: Name does not resolve — The server is not responding (or the local server's socket is not correctly configured). \r\n```\r\n\r\nThere is a way to solve the issue but it is not to my satisfaction:\r\nThe phpmyadmin service be set up in such a way that it bypasses the nginx-proxy network entirely - like this:\r\n\r\n```\r\nversion: '2'\r\nservices:\r\n  phpmyadmin:\r\n    restart: always\r\n    image: phpmyadmin/phpmyadmin\r\n    links:\r\n      - db\r\n    ports:\r\n      - 8080:80\r\n##    environment:\r\n##      - VIRTUAL_HOST=db.mydomain.com\r\n##   networks:\r\n##      - nginx-proxy\r\n```\r\nIn this \"solution\", phpMyAdmin can be accessed at ***any*** subdomain at port 8080 (not very elegant. Note how all the connections to the network are commented out).\r\n\r\n***What i want*** is to access my phpmyadmin login at a ***specific*** subdomain db.mydomain.com.\r\n\r\nPreferably, the phpmyadmin service would be behind the nginx-proxy network, but if it is not possible i guess i can live without it...\r\n\r\nHave spent days trying to crack this one, any help or guidelines would be very appreciated!"},"comment":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/comments/252618559","html_url":"https://github.com/jwilder/nginx-proxy/issues/596#issuecomment-252618559","issue_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/596","id":252618559,"user":{"login":"victor-lund","id":6714401,"avatar_url":"https://avatars.githubusercontent.com/u/6714401?v=3","gravatar_id":"","url":"https://api.github.com/users/victor-lund","html_url":"https://github.com/victor-lund","followers_url":"https://api.github.com/users/victor-lund/followers","following_url":"https://api.github.com/users/victor-lund/following{/other_user}","gists_url":"https://api.github.com/users/victor-lund/gists{/gist_id}","starred_url":"https://api.github.com/users/victor-lund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victor-lund/subscriptions","organizations_url":"https://api.github.com/users/victor-lund/orgs","repos_url":"https://api.github.com/users/victor-lund/repos","events_url":"https://api.github.com/users/victor-lund/events{/privacy}","received_events_url":"https://api.github.com/users/victor-lund/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T13:29:31Z","updated_at":"2016-10-10T13:29:31Z","body":"Hm. I installed a fresh Digitalocean droplet and ran the setup: same exact issue...\r\n\r\nI'm not sure which logs that could be interesting (I'm a droplet beginner as I'm sure you have realized) so I'm uploading one log from each site and the one for the proxy.  The logs should contain data from the point of building to the point to the point of trying to log in to a's and b's databases.\r\n\r\n[logs.zip](https://github.com/jwilder/nginx-proxy/files/519550/logs.zip)\r\n"}}
{"actor":{"display_login":"victor-lund"}}