{"action":"closed","issue":{"url":"https://api.github.com/repos/evertramos/docker-compose-letsencrypt-nginx-proxy-companion/issues/72","repository_url":"https://api.github.com/repos/evertramos/docker-compose-letsencrypt-nginx-proxy-companion","labels_url":"https://api.github.com/repos/evertramos/docker-compose-letsencrypt-nginx-proxy-companion/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/evertramos/docker-compose-letsencrypt-nginx-proxy-companion/issues/72/comments","events_url":"https://api.github.com/repos/evertramos/docker-compose-letsencrypt-nginx-proxy-companion/issues/72/events","html_url":"https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion/issues/72","id":333819928,"node_id":"MDU6SXNzdWUzMzM4MTk5Mjg=","number":72,"title":"trying to enforce a http => https redirect","user":{"login":"daithi-coombes","id":1945527,"node_id":"MDQ6VXNlcjE5NDU1Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1945527?v=4","gravatar_id":"","url":"https://api.github.com/users/daithi-coombes","html_url":"https://github.com/daithi-coombes","followers_url":"https://api.github.com/users/daithi-coombes/followers","following_url":"https://api.github.com/users/daithi-coombes/following{/other_user}","gists_url":"https://api.github.com/users/daithi-coombes/gists{/gist_id}","starred_url":"https://api.github.com/users/daithi-coombes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daithi-coombes/subscriptions","organizations_url":"https://api.github.com/users/daithi-coombes/orgs","repos_url":"https://api.github.com/users/daithi-coombes/repos","events_url":"https://api.github.com/users/daithi-coombes/events{/privacy}","received_events_url":"https://api.github.com/users/daithi-coombes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-19T20:08:08Z","updated_at":"2018-06-20T12:37:06Z","closed_at":"2018-06-20T12:37:05Z","author_association":"NONE","body":"# Error description:\r\nTrying to force all http traffic to 301 to https. Looking in code I found env var `HTTPS_REDIRECT` and have set this to 'redirect'. Now requests from http redirect to https, but nginx default `502 Bad Gateway` is returned.\r\n\r\n# Steps to reproduce\r\n\r\n`./.env`\r\n```\r\nHTTPS_METHOD=redirect\r\n```\r\n\r\n# Expected result\r\nAll traffic from http would be routed to https\r\n\r\n# Error result\r\n502 Bad Gateway\r\n\r\n# Comments\r\n\r\nThe stdout from `nginx-web`:\r\n```\r\nnginx-web            | example.biz 83.136.43.186 - - [19/Jun/2018:19:55:25 +0000] \"GET / HTTP/2.0\" 502 173 \"-\" \"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0\"\r\nnginx-web            | 2018/06/19 19:55:25 [error] 9#9: *11 no live upstreams while connecting to upstream, client: 83.136.43.186, server: exqmple.biz, request: \"GET / HTTP/2.0\", upstream: \"http://exaple.biz/\", host: \"example.biz\"\r\n```\r\n\r\nThe resulting `./conf.d/default.conf` file:\r\n```\r\nserver {                                     \r\n        server_name example.biz;\r\n        ...\r\n        return 301 https://$host$request_uri;\r\n}                                                  \r\nserver {                                            \r\n        server_name example.biz;                                        \r\n        listen 443 ssl http2 ;                                            \r\n        ...\r\n        include /etc/nginx/vhost.d/default;\r\n        location / {\r\n                proxy_pass http://example.biz;   // redirect loop, redirected back to 443\r\n        }\r\n}\r\n```\r\n\r\nThink this might be causing a redirect loop?\r\n"}}
{"actor":{"display_login":"daithi-coombes"}}