Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Domain names magic #386

Closed
microspace opened this issue Mar 9, 2016 · 3 comments
Closed

Domain names magic #386

microspace opened this issue Mar 9, 2016 · 3 comments

Comments

@microspace
Copy link

I have two site behind nginx-proxy. One is flask-app, the other is wordpress site.
When I enter www.wp-site-domain.ru, browser redirects me to wp-site-domain.ru with 301 redirect
With flask site, when I enter www.flask-site.ru, browser doesn't redirect me.
Screenshot
But I used similar docker command to launch both containers!!
I can't understand where the redirect magic happens!
I launch flask app using this
docker run -d --restart=always -e VIRTUAL_HOST=*.flask-site.ru,flask-site.ru myflask
I launch wordress using this:
docker run -d --restart=always --name wordpress1 --volumes-from wordpress1_data --link wordpress1_mariadb:mysql -e VIRTUAL_HOST=*.wp-site-domain.ru,wp-site-domain.ru wordpress

@microspace
Copy link
Author

At last I should make 301 redirection from www to nonwww?
But why wordpress site makes redirection is still mysterious for me.

@helderco
Copy link

Inspect your /etc/nginx/conf.d/default.conf file produced by docker-gen in nginx-proxy.

@microspace
Copy link
Author

https://gist.github.com/microspace/60c7b4e59136a529d316
No clue to who does the redirection

@tkw1536 tkw1536 converted this issue into discussion #1952 Apr 10, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@helderco @microspace and others