这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@kirushanths
Copy link
Contributor

Example Actual:
http://example.com > https://example.com (works as it should)
http://test.example.com > https://.example.com (BROKEN)
http://api.example.com > https://
.example.com (BROKEN)
http://app.example.com > https://.example.com (BROKEN)
( https://
.example.com may appear as https://%2A.example.com depending on browser)

Example Expected:
http://example.com > https://example.com (works as it should)
http://test.example.com > https://test.example.com (Expected)
http://api.example.com > https://api.example.com (Expected)
http://app.example.com > https://app.example.com (Expected)

nginx redirects to https://*.example.com/ which is a bogus url due to the $SSL_SERVER_NAME in the nginx template
Use nginx variable $host to do proper redirect

use nginx $host variable intead of $ssl_server_nam (which may be *.example.com) which does bogus redirects
@kirushanths kirushanths changed the title Update nginx.ssl.conf.template Fix broken ssl wildcard redirect Jun 5, 2015
@michaelshobbs
Copy link
Member

Are you sure this is still an issue in master? Ostensibly this was fixed via #1202

@kirushanths
Copy link
Contributor Author

Im using Dokku v0.3.17
Still seems to be an issue. My use case might be special since I have one dokku instance that accepts multiple sub domain urls, so I need the wildcard ssl redirect to maintain the original url.

Even then, using nginx $host is a better solution than just dumping the domain variable from the bash script into the nginx config

@michaelshobbs
Copy link
Member

As a side note, you could also provide your own template for these apps instead.

Your explanation makes sense. I'm wondering if we're breaking any assumptions or expected behaviors with this change.

@lmars @josegonzalez thoughts on this?

@josegonzalez
Copy link
Member

I'm okay with this change, makes sense to me, so long as tests pass :)

@michaelshobbs
Copy link
Member

👍

michaelshobbs added a commit that referenced this pull request Jun 5, 2015
…sl_wildcard_redirect

Fix broken ssl wildcard redirect
@michaelshobbs michaelshobbs merged commit dda2ac0 into dokku:master Jun 5, 2015
@kirushanths
Copy link
Contributor Author

👍

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

Successfully merging this pull request may close these issues.

3 participants