Until I found why Safari wants to force SSL and doesnβt want to use the unsafe (http) version of my site in this Vagrant / Homestead field (like Firefox or Chrome), I found a way to mark the siteβs self-signed certificate as trusted in accessing Keychain for MacOS .
Please note that this should not be a problem with the previous version of MacOS, since Safari allows you to add an exception directly to the browser and continue to work with the site with an invalid SSL certificate. These seam options will disappear in Safari 11 (High Sierra).
So, the solution for accessing my vagrant website is to save the website certificate on the host computer (using an ssh connection to the Vagrant mailbox or another browser), add this to the Keychain and mark it as trusted.
However, there was another issue related to Keychain Access. While it was used to work on an earlier version of MacOS, in High Sierra (or at least 10.13.2 Beta), the ability to mark a certificate as trusted from the Keychain Access application has been removed . On both the iMac and MacbookAir, double-clicking on the certificate added to Keychain does absolutely nothing . Even clicking Get Info from the context menu does not allow editing the certificate.
A workaround for this is to use the command line to mark the certificate as trusted. Using Terminal, cd to the directory where the certificate is stored on your computer and run the following command:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain example.app.cer
Change example.app.cer to the name of your certificate. This will mark the certificate as trusted in Keychain Access and allow you to visit the local site as if it were signed with a valid certificate.
tl; dr Add the site certificate, taken from the Vagrant / Homestead box, to the key chain, run the command and just use the https link.
source share