Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown SSL Subdomain bypasses the VIRTUAL_HOST variable #623

Closed
toussa opened this issue Nov 4, 2016 · 2 comments
Closed

Unknown SSL Subdomain bypasses the VIRTUAL_HOST variable #623

toussa opened this issue Nov 4, 2016 · 2 comments

Comments

@toussa
Copy link

toussa commented Nov 4, 2016

Hello,

I'm facing a problem regarding the routing of SSL domains, that could be an issue of nginx-proxy:

I have a back-end nginx serving only on port 80 (HTTP), with the following config:

nginx:
    image: nginx
    volumes:
      - "./www:/usr/share/nginx/html:ro"
      - "./conf/nginx/:/nginx:ro"
      - "./conf/tools:/tools:ro"
    networks:
      - middle-end
    environment:
      - "VIRTUAL_HOST=a.com,sub.a.com,b.com"
      - "CERT_NAME=shared_certif"
    command: "/bin/bash /nginx/start-nginx.sh"

It works well with nginx-proxy when using it with http:
"http://a.com" and "http://sub.a.com" get redirected to "https://a.com" and "https://sub.a.com"

The problem comes when I try to access something like "https://fake.a.com" => nginx-proxy redirects the request to my upstream, even if "fake.a.com" wasn't written in VIRTUAL_HOST.

Note that when I try to access with HTTP (http://fake.a.com), I get the logical error 503

@toussa
Copy link
Author

toussa commented Nov 7, 2016

Looks like it can be related to the pull request: #614

@buchdag
Copy link
Member

buchdag commented May 10, 2023

This was fixed in #2186

@buchdag buchdag closed this as completed May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants