3

I am running DDEV on a MacBook. DDEV used to deliver projects at https://projectname.ddev.site but now only starts up http://projectname.ddev.site. I cannot say exactly when this change happend. I am aware of the notice "mkcert may not be properly installed ..." I did follow the install suggestions but it didn't change. What can I do to make ddev run https?

Starting testproject... 
mkcert may not be properly installed, we suggest installing it for trusted https support, `brew install mkcert nss`, `choco install -y mkcert`, etc. and then `mkcert -install` 
The hostname testproject.ddev.site is not currently resolvable, trying to add it to the hosts file 
ddev needs to add an entry to your hostfile.
It will require administrative privileges via the sudo command, so you may be required
to enter your password for sudo. ddev is about to issue the command: 
    sudo /usr/local/bin/ddev hostname testproject.ddev.site 127.0.0.1 
Please enter your password if prompted. 
Running   Command=sudo /usr/local/bin/ddev hostname testproject.ddev.site 127.0.0.1
Password:
Creating volume "testproject-mariadb" with default driver 
Building db 
Building web 
Creating ddev-testproject-db ... done
Creating ddev-testproject-dba ... done
Creating ddev-testproject-web ... done
 
Creating ddev-router ... done
 
Project type has no settings paths configured, so not creating settings file. 
Successfully started testproject 
Project can be reached at http://testproject.ddev.site http://127.0.0.1:32889 
kais-MBP:testproject kai$ ```



.ddev/config.yaml
```name: testproject
type: php
docroot: ""
php_version: "7.3"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.2"
mysql_version: ""
provider: default
use_dns_when_possible: true
composer_version: ""

1 Answers1

10

You need to run mkcert -install to make https work, and ddev detects whether you have done that. So ddev poweroff and mkcert -install and ddev start and you should see trusted https URLs.

If that doesn't do it, try completely removing the mkcert CA with ddev poweroff && mkcert -uninstall && sudo rm -rf "$(mkcert -CAROOT)" && mkcert -install - that completely uninstalls and reinstalls mkcert.

rfay
  • 9,963
  • 1
  • 47
  • 89
  • I did that allready and did it again. Also updated ddev. Still ddev start notes mkcert may not be installed properly ... and only sets up http URLs. – noah brooklyn Dec 03 '20 at 10:43
  • Let's try uninstalling and reinstalling then. It's possible it's a permissions problem or something. `mkcert -uninstall` and `sudo rm -f "$(mkcert -CAROOT)"`, then `mkcert -install` again. We might be more successful with interactive support on slack or gitter... https://ddev.readthedocs.io/en/stable/#support-and-user-contributed-documentation – rfay Dec 04 '20 at 13:00
  • YESS! This helped. Thanks a lot for guiding me. It is ```sudo rm -rf "$(mkcert -CAROOT)"``` of course to remove the directory. – noah brooklyn Dec 04 '20 at 18:44
  • Thanks, I edited the answer to show the full removal technique. – rfay Dec 05 '20 at 00:45