Homestead: HTTPS not working

Created on 7 Dec 2017  路  14Comments  路  Source: laravel/homestead

Versions

  • Vagrant: Vagrant 2.0.1
  • Provider: VirtualBox 5.2.2 r119230
  • Homestead: Tag v7.0.1

Host operating system

MacOS 10.13.2(17C88)

Homestead.yaml

ip: "192.168.10.10"
memory: 4096
cpus: 4
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /Users/kimtree/Documents/datable/hashup
      to: /home/vagrant/Code/hashup
      type: "nfs"
    - map: /Users/kimtree/Documents/datable/queduck
      to: /home/vagrant/Code/queduck
      type: "nfs"

sites:
    - map: hashup.dev
      to: /home/vagrant/Code/hashup/public
      php: "7.0"
    - map: queduck.dev
      to: /home/vagrant/Code/queduck/public
      php: "7.0"

databases:
    - homestead

Vagrant destroy & up output

https://gist.github.com/kimtree/50cc80eed0f344417f7a42129f83fcdd

Expected behavior

It has to be work.

Actual behavior

Chrome 63.0.3239.84(stable) (64bit) returns "NET::ERR_CERT_AUTHORITY_INVALID" error and It shows info below.

Subject: hashup.dev
Issuer: hashup.dev
Expires on: 2018. 12. 7.
Current date: 2017. 12. 7.

Steps to reproduce

  1. vagrant up
  2. Just open a site URL from host machine

References

None.

Most helpful comment

@lionslair It looks like newer version browsers restricted to use some TLDs for test purpose. see https://github.com/laravel/homestead/issues/668
https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

I changed TLD from .dev to .test and It works.

All 14 comments

I literally just started getting this to and I am not trying to access sites on SSL but it is redirecting anyway

@lionslair It looks like newer version browsers restricted to use some TLDs for test purpose. see https://github.com/laravel/homestead/issues/668
https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

I changed TLD from .dev to .test and It works.

I am using .app so I need to change them all?

@lionslair Yes. I'd prefer you to change stable TLDs. (FYI, Homestead changed default TLD to .localhost as you can see #668 )

FYI Homestead defaults to .test since #697 due to issues with MacOS not liking .localhost

Seems that it only works without https. Did anyone succeed using https?
http://homestead.test works fine.
https://homestead.test does not work.

@dorin-niscu I also failed to use SSL on .test domains. The only thing I can try is adding the self-signed certificate in the vagrant machine to host and then set to always trust.

How can I change TLDs if I have 2 sites (site itself and phpMyAdmin) on same IP? It doesn't work if you change only hosts file.

@daryn-k You have to edit Homestead.yaml file.

@kimtree I'm wondering if you could please help me with Homestead certificate not working. I've spent so many hours over so many weeks on this Homestead SSL issue and haven't made any progress. I'd love any suggestions, and I've created a bounty here: https://stackoverflow.com/q/48969083/470749
Thanks so much.

I succed using Homestead and SSL following this post: http://blog.getpostman.com/2014/01/28/using-self-signed-certificates-with-postman/
You must need to do some configurations with the certifieds on your explorer.

@luisbits Thanks, Luis. I've tried those steps so many times, and even though the certificate exports and imports successfully, I still have the error in Chrome (after restarting):

Certificate - missing
This site is missing a valid, trusted certificate (net::ERR_CERT_AUTHORITY_INVALID).

I've opened a new issue (linked above).

Please @kimtree could you explain how can we add this self-signed certificate in the vagrant machine to host and and then set to always trust. I've seeing many opened issues about how to use homestead with HTTPS (whitch is required to Progressive Web Apps development). I also read many answers to this issues like that "Homestead in latest version has suport for SSL, just run de https://url.normaly.test". Not sure about that, but its not just type the url on the browser. There is more things to do becuse an error is thrown on the browser. Please, help me.

@arturcesarmelo I think https://stackoverflow.com/a/49612084/470749 was how I eventually got it working. Good luck.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gormus picture gormus  路  4Comments

steveheinsch picture steveheinsch  路  3Comments

Modelizer picture Modelizer  路  5Comments

yazeed picture yazeed  路  3Comments

Quix0r picture Quix0r  路  4Comments