3

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?

Community
  • 1
  • 1
Simon Davies
  • 3,574
  • 8
  • 37
  • 67
  • I'm still having trouble, but I think https://stackoverflow.com/a/42917227/470749 and https://github.com/laravel/homestead/issues/526 might help. – Ryan Feb 24 '18 at 22:34
  • no, not anymore thanks @Ryan but i have switch over to Laravel Valet for the last few years, it makes SSL / https more easier :-), but thanks and might help pthers – Simon Davies Feb 26 '18 at 20:11
  • I'm still trying to solve it here: https://stackoverflow.com/q/48969083/470749 – Ryan Feb 26 '18 at 22:37
  • I've added a big bounty to my question about getting Chrome or Firefox to accept a local certificate: https://stackoverflow.com/q/48969083/470749 – Ryan Mar 31 '18 at 23:02

2 Answers2

5

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".

Set the trust level to "Always trust"

Restart Chrome and you're done.

sepehr
  • 13,648
  • 5
  • 73
  • 111
1

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.

Community
  • 1
  • 1
Pᴇʜ
  • 45,553
  • 9
  • 41
  • 62