我正在MacBook上运行DDEV。DDEV过去在https://projectname.ddev.site上交付项目,但现在只启动http://projectname.ddev.site。我不能确切地说这种变化是什么时候发生的。我知道通知"mkcert可能安装不当.“我确实遵循了安装建议,但没有改变。我能做些什么让ddev运行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类型: php
docroot:"“
php_version:"7.3“
webserver_type: nginx
router_http_port:"80“
router_https_port:"443“
xdebug_enabled:假
additional_hostnames:[]
additional_fqdns:[]
mariadb_version:"10.2“
mysql_version:"“
提供者:默认
use_dns_when_possible:真
composer_version:"“
发布于 2020-12-02 15:37:49
您需要运行mkcert -install才能使https工作,并且ddev检测您是否已经这样做过。因此,ddev poweroff、mkcert -install和ddev start以及您应该会看到可信的https URL。
如果这样做做不到,尝试使用ddev poweroff && mkcert -uninstall && sudo rm -rf "$(mkcert -CAROOT)" && mkcert -install完全删除mkcert这将完全卸载和恢复mkcert。
https://stackoverflow.com/questions/65111024
复制相似问题