valet-linux: SSL certificate invalid
I am having trouble to get HTTPS working on my site:
WSL UBUNTU PHP 7.2.10-0ubuntu0.18.04.1 Chrome Version 77.0.3865.120 (Official Build) (64-bit) Valet v2.1.10
I also tried FF and Edge with same result.
In Edge I saved the SSL certificate in a file and then tried to import this file to chrome. This gives me a success message, but the certificate is not showing in chrome.
I did secure my site:
$ valet secured mysite.test
mysite.test is secured.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23
I had the same problem just go into your browser -> certifcate -> authorities -> import LaravelValetCASelfSigned
LaravelValetCASelfSigned is place in your $HOME/.valet/CA
Then if you re on chrome just enable this parameter chrome://flags/#allow-insecure-localhost .
If you re not on chrome you should have a parameter like this to find.
Then open Chrome and paste this in the search:
chrome://settings/securityClick onManage CertificatesGoto theTrusted Root Certification Authoritiestab Click Import, Next, BrowseLeave this open then run the following in a terminal for WSL
Copy the path in the top bar in the explorer and paste into the browse dialog we opened previously (should look something like below):
\\wsl.localhost\Ubuntu\home\YOURWSLUSERNAME\.valet\CAThen select
LaravelValetCASelfSigned.pem(You may have to chooseShow Allin the bottom rightThen click Open, Next, Next, Finish
Close your browser and open it again and you should have all sites served by valet secure
big thanks to @chiptu , for anyone having hard time finding the browser settings
chrome : search for
Manage Certificates> authorities > import LaravelValetCASelfSigned ff : searchCertificates> view Certificates > authorities > import LaravelValetCASelfSignedI solved my issue. The problem is
cert9.dbkey4.dbpkcs11.txtfiles owner issue.valet-linuxcreate the files asroot:root. so, valet can’t write files.My solutions
Unsecure mysite
Remove
pkidirectoryMake pki directory and change permission
Secure site : then Valet creates
cert9.dbkey4.dbpkcs11.txtfiles.Check the files.
Change the files owner
Then
valet unsecure mysitevalet secure mysitethis one work for me, I am using wsl2 ubuntu 22.04