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

503 for default or non-existent virtual hosts #416

Closed
mcnesium opened this issue Jul 16, 2018 · 2 comments
Closed

503 for default or non-existent virtual hosts #416

mcnesium opened this issue Jul 16, 2018 · 2 comments
Labels
status/duplicate This issue / PR is a duplicate of another one

Comments

@mcnesium
Copy link

There should be a 503 or something, if a request comes in on a domain or IP address that is not defined by VIRTUAL_HOST env var. Instead, it just redirects to the first defined one.

According to this there must be a default added to the default listen-directive, for which I assume here is the right place. This file gets re-generated each time the proxy container starts though.

Is this within the scope of this project or rather upstream at jwilder/nginx-proxy?

@buchdag
Copy link
Member

buchdag commented Jul 17, 2018

According to the answer from server fault that you quoted:

If you omit the default parameter, the first server block is treated as the default.

So this server block is already the default, being always the first.

I think your issue is instead yet another duplicate of #74, #373 and #411

If it is, could you close this issue and continue the discussion on #411 ?

@mcnesium
Copy link
Author

Looks like it. My experience with nginx is very little, I can only compare it to Apache's 000-default.conf that prevents requests to arbitrary domains/IP-addresses to reach a wrong web service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/duplicate This issue / PR is a duplicate of another one
Projects
None yet
Development

No branches or pull requests

2 participants