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

Nginx gives warnings when configuring a redirect AND domain for an alias domain. #25

Open
cooperaj opened this issue Jan 30, 2019 · 0 comments

Comments

@cooperaj
Copy link

Suppose you have two domains;

example.io and example.com

and you want to direct all traffic to example.io such that all the following is true;

example.com is just an alias in that you want it there to capture traffic but you want your visitors to end up on example.io. When you throw letsencrypt into the mix you end up with Nginx throwing warnings as the required domains interfere with the redirects that this plugin puts in place.

To setup letsencrypt for the https://(www)?\.example\.(io|com) you need to add the domains via the dokku domains functionality. You'll also need to add redirects via dokku redirect but when you do this Nginx starts warning about duplicate server names.

nginx: [warn] conflicting server name "www.example.io" on [::]:80, ignored
nginx: [warn] conflicting server name "www.example.com" on [::]:80, ignored
nginx: [warn] conflicting server name "example.com" on [::]:80, ignored
nginx: [warn] conflicting server name "www.example.io" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.example.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.example.io" on [::]:443, ignored
nginx: [warn] conflicting server name "www.example.com" on [::]:443, ignored
nginx: [warn] conflicting server name "example.com" on [::]:443, ignored
nginx: [warn] conflicting server name "www.example.io" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.example.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "example.com" on 0.0.0.0:443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

@josegonzalez suggests that it could be possible to inject domains from this redirect plugin into the letsencrypt domain list so so that it not necessary to add them via dokku domains

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

1 participant