Skip to content

HTTPS proxy-pass redirects to HTTP #28

@BenHall

Description

@BenHall

I have an infinite loop in my configuration.

$ curl -i http://www.brownbag.tv
HTTP/1.1 301 Moved Permanently
Date: Sun, 27 Dec 2015 13:29:15 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Location: https://www.brownbag.tv/
Server: cloudflare-nginx
CF-RAY: 25b55f9271c43560-LHR

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.9.6</center>
</body>
</html>

$ curl -i https://www.brownbag.tv
HTTP/1.1 301 Moved Permanently
Server: cloudflare-nginx
Date: Sun, 27 Dec 2015 13:29:21 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Location: http://www.brownbag.tv/
CF-RAY: 25b55fb5415a3488-LHR

This is my docker-compose.yml file

nginx:
  image: dmp1ce/nginx-proxy-letsencrypt:latest
  volumes:
    - /var/run/docker.sock:/tmp/docker.sock
  ports:
    - 80:80
    - 443:443
  restart: always
web:
  build: .
  environment:
    VIRTUAL_HOST: 'www.brownbag.tv'
    LETSENCRYPT_HOST: 'www.brownbag.tv'
    LETSENCRYPT_EMAIL: '<>'
    NODE_ENV: 'production'
  restart: always

Here is the generated nginx.conf - https://gist.github.com/BenHall/b0922114dd9903b81515

The proxy-pass is "proxy_pass http://www.brownbag.tv" but this just redirects to HTTPS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions