Everything needs HTTPS nowadays, and even working locally can require HTTPS to function correctly. As was the case recently as I was trying to build a feature which relied on browser notifications on Chrome. They simply wouldn’t work in my Homestead setup over HTTP.
So.. how to get HTTPS working in Homestead? Turns out its pretty easy. Follow these steps:
1. Assuming you have mysite.test domain already configured in Homestead and Homestead.yaml file – SSH into homestead and navigate to /etc/nginx/ssl. Copy the .crt file to your local machine.
2. Now the .crt file needs to be added to the Mac Keychain Access and trusted. Open Keychain Access and drag the .crt file onto the Certificates area.
3. Once added, double click the .crt in teh Keychain Access and set it to always be trusted.
4. Thats it! https://mysite.test should now be viewable in browser.