{"action":"created","issue":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/249","labels_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/249/comments","events_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/249/events","html_url":"https://github.com/jwilder/nginx-proxy/issues/249","id":110273241,"number":249,"title":" Error during the nginx's refresh","user":{"login":"Jermorin","id":5834959,"avatar_url":"https://avatars.githubusercontent.com/u/5834959?v=3","gravatar_id":"","url":"https://api.github.com/users/Jermorin","html_url":"https://github.com/Jermorin","followers_url":"https://api.github.com/users/Jermorin/followers","following_url":"https://api.github.com/users/Jermorin/following{/other_user}","gists_url":"https://api.github.com/users/Jermorin/gists{/gist_id}","starred_url":"https://api.github.com/users/Jermorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jermorin/subscriptions","organizations_url":"https://api.github.com/users/Jermorin/orgs","repos_url":"https://api.github.com/users/Jermorin/repos","events_url":"https://api.github.com/users/Jermorin/events{/privacy}","received_events_url":"https://api.github.com/users/Jermorin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-07T17:11:28Z","updated_at":"2015-10-07T18:39:34Z","closed_at":null,"body":"I run these simple commands, that's missing me?\r\n\r\n```\r\ndocker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy\r\n\r\n==> 49d31d23e948\r\n```\r\n\r\n```\r\ndocker run  -e 'VIRTUAL_HOST=web.domain.com' \r\n            -v $(pwd):/usr/share/nginx/html:ro \r\n            --expose 80 \r\n            -d nginx\r\n```\r\n\r\n$(pwd) : contain index.html with helloWorld.\r\n\r\n```\r\nroot@jermorin:~# docker logs 49d31d23e948\r\nforego     | starting nginx.1 on port 5000\r\nforego     | starting dockergen.1 on port 5100\r\ndockergen.1 | 2015/10/07 17:01:48 Generated '/etc/nginx/conf.d/default.conf' from 1 containers\r\ndockergen.1 | 2015/10/07 17:01:48 Running 'nginx -s reload'\r\ndockergen.1 | 2015/10/07 17:01:48 Watching docker events\r\ndockergen.1 | 2015/10/07 17:01:58 Received event start for container a87c828bafb2\r\ndockergen.1 | 2015/10/07 17:01:58 Generated '/etc/nginx/conf.d/default.conf' from 2 containers\r\ndockergen.1 | 2015/10/07 17:01:58 Running 'nginx -s reload'\r\ndockergen.1 | 2015/10/07 17:01:58 Error running notify command: nginx -s reload, exit status 1\r\n```\r\n\r\nThank you in advance for your help"},"comment":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/comments/146288970","html_url":"https://github.com/jwilder/nginx-proxy/issues/249#issuecomment-146288970","issue_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/249","id":146288970,"user":{"login":"Jermorin","id":5834959,"avatar_url":"https://avatars.githubusercontent.com/u/5834959?v=3","gravatar_id":"","url":"https://api.github.com/users/Jermorin","html_url":"https://github.com/Jermorin","followers_url":"https://api.github.com/users/Jermorin/followers","following_url":"https://api.github.com/users/Jermorin/following{/other_user}","gists_url":"https://api.github.com/users/Jermorin/gists{/gist_id}","starred_url":"https://api.github.com/users/Jermorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jermorin/subscriptions","organizations_url":"https://api.github.com/users/Jermorin/orgs","repos_url":"https://api.github.com/users/Jermorin/repos","events_url":"https://api.github.com/users/Jermorin/events{/privacy}","received_events_url":"https://api.github.com/users/Jermorin/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T18:39:34Z","updated_at":"2015-10-07T18:39:34Z","body":"\r\n\r\ndocker exec -ti <nginx-proxy-id> nginx -t\r\n```\r\nnginx: the configuration file /etc/nginx/nginx.conf syntax is ok\r\nnginx: configuration file /etc/nginx/nginx.conf test is successful\r\n````\r\ndocker exec -ti <nginx-proxy-id> cat /etc/nginx/conf.d/default.conf\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\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\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\n\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\n\r\naccess_log off;\r\n\r\n\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\r\n\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 vhost;\r\n\treturn 503;\r\n}\r\n\r\nupstream web.jermor.in {\r\n\t\t\t# lonely_archimedes\r\n\t\t\tserver xxx.xx.xx:80;\r\n}\r\nserver {\r\n\tserver_name web.jermor.in;\r\n\tlisten 80 ;\r\n\taccess_log /var/log/nginx/access.log vhost;\r\n\tlocation / {\r\n\t\tproxy_pass http://web.jermor.in;\r\n\t}\r\n}\r\n```"}}