You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use wildcard FQDN for ddev sites instead of manipulating /etc/hosts (most of the time) #175
Feature request: Our current way of specifying a ddev hostname for a site involves manipulating /etc/hosts, which requires root permissions. However, we can do what kalabox does and switch to using an actual resolvable domainame which has a wildcard on it. We can retain the ddev hostname command for uses when people are offline and give them explicit instructions on it.
This was touched on today. @rfay Can you provide additional information what this would look like as well as what the fallback would be if an internet connection was not available?
The way current versions of kalabox do this is they put a wildcard dns record for *.kbox.site, so that anythingyouwant.kbox.site will resolve to 127.0.0.1. We could do *.ddev.site or any such.
When offline, a person would have to manually add a hosts file entry. On osx or linux, this could be done with sudo ddev hostname me.ddev.site 127.0.0.1. I would expect on windows we'd have to give instructions about how to run ddev with admin privs. (Or have them edit c:\windows\system32\drivers\etc\hosts)
@rfay In my experience, the process of generating a CSR to obtain an SSL does not require providing the IP address or having the domain A record pointed at a server/IP address.
Now on the flip side, getting a real, non-self signed cert to work without connection to the internet, that's a separate item that I'm not sure would work/not work. So breaking this into two components: 1) getting an issued SSL cert and 2) getting said cert to work locally against 127.0.0.1 without connection to the internet.
I might be having a brain fart. Easy to test. You're certainly right that the IP is a part of getting a cert. Either I'm just off in lala land or browsers no longer accept.
On SSL: Sorry, I was just backwards confused. I was thinking about issuing a cert for an unregistrable domain (like .local or whatever). I was able to put junkssl.drud.com on my local machine at 127.0.0.1, and use our drud.com wildcard to access it, both firefox and chrome were fine with it.
The one issue here is that we'd have to distribute a key/crt for the wildcard cert, which would mean that even a slightly ambitious person could use that in another context. But since we control the DNS, it doesn't seem like that big an issue, but worthy of thought.
However... this doesn't really have anything to do with this issue, because DNS is unneeded for the use of SSL. Just having a name in the hosts file and a wildcard cert configured on the nginx container would do the job just fine.
Activity
rickmanelius commentedon May 16, 2017
This was touched on today. @rfay Can you provide additional information what this would look like as well as what the fallback would be if an internet connection was not available?
rfay commentedon May 16, 2017
The way current versions of kalabox do this is they put a wildcard dns record for *.kbox.site, so that
anythingyouwant.kbox.sitewill resolve to 127.0.0.1. We could do *.ddev.site or any such.When offline, a person would have to manually add a hosts file entry. On osx or linux, this could be done with
sudo ddev hostname me.ddev.site 127.0.0.1. I would expect on windows we'd have to give instructions about how to run ddev with admin privs. (Or have them edit c:\windows\system32\drivers\etc\hosts)BTW, our current usage of .local isn't exactly correct, as it is in fact reserved for specific local mDNS operations.
rickmanelius commentedon May 16, 2017
Related issues:
rfay commentedon May 17, 2017
AFAIK it's impossible to get a real SSL cert that points to a non-internet IP address, so it probably wouldn't do that.
I don't think it's related to the ideas in "vagrant share"
rickmanelius commentedon May 17, 2017
@rfay In my experience, the process of generating a CSR to obtain an SSL does not require providing the IP address or having the domain A record pointed at a server/IP address.
rickmanelius commentedon May 17, 2017
Now on the flip side, getting a real, non-self signed cert to work without connection to the internet, that's a separate item that I'm not sure would work/not work. So breaking this into two components: 1) getting an issued SSL cert and 2) getting said cert to work locally against 127.0.0.1 without connection to the internet.
rfay commentedon May 17, 2017
I might be having a brain fart. Easy to test. You're certainly right that the IP is a part of getting a cert. Either I'm just off in lala land or browsers no longer accept.
rfay commentedon May 17, 2017
On SSL: Sorry, I was just backwards confused. I was thinking about issuing a cert for an unregistrable domain (like .local or whatever). I was able to put junkssl.drud.com on my local machine at 127.0.0.1, and use our drud.com wildcard to access it, both firefox and chrome were fine with it.
The one issue here is that we'd have to distribute a key/crt for the wildcard cert, which would mean that even a slightly ambitious person could use that in another context. But since we control the DNS, it doesn't seem like that big an issue, but worthy of thought.
However... this doesn't really have anything to do with this issue, because DNS is unneeded for the use of SSL. Just having a name in the hosts file and a wildcard cert configured on the nginx container would do the job just fine.
rickmanelius commentedon Jun 6, 2017
This is not a priority at the moment. Pulling out of this for now.
rickmanelius commentedon Oct 19, 2017
This will also be addressed in #416 and we will continue to use /etc/host as a fallback when access to a valid TLD is not achievable.