问题
I followed the following details on creating an SSL certificate, so I can run local test sites via Laravel's Homestead, using https.
Adding https cert on homestead vm
All is well but when viewing the test domain over https://, I get a red cross on Chrome's address bar. It says that the certificate is untrusted due to being self-signed and not verified by third-party.
Is there a way that I can sort this out? So that I can get my HTTPS local domains to be trusted by Chrome and work as if online?
回答1:
Chrome does not allow you to export the certificate anymore. You need to either use another browser that supports this feature (e.g. firefox) or just simply copy the generated certificate to the shared directory from your homestead machine, so then you can import and trust it in the keychain.
# where I share all homestead certs with the host machine
mkdir /home/vagrant/Code/.certs/
cp -vf /etc/nginx/ssl/homestead.app.cert /home/vagrant/Code/.certs
On your local host machine, open the certificate file and import it to the System keychain. Once imported, open it and set its trust level to "Always trust".

Restart Chrome and you're done.
回答2:
You have to trust your self signed certificate in chrome to remove the "red cross" message.
There are several tutorials how to trust a self signed certificate in chrome: See https://stackoverflow.com/a/18602774/3219613 for example.
来源:https://stackoverflow.com/questions/27808548/verifying-a-self-signed-certificate-on-local-laravel-homestead-server