Laravel Valet associating incorrect certificate with secure link

Viewed 1422

I've been using Laravel Valet for while, and I've just encountered a situation that is working my last nerve: after creating a new Laravel project, I went to the public directory and did valet link my_project, then valet secure my_project. Now, valet links shows https://my_project.test but when going there, I get "Your connection is not private".

In Chrome, you can click on "Not Secure" and see the certificate, and when I do this, it shows the certificate for a different one of my projects! I have looked at my ~/.config/valet/Certificates directory, and the my_project.test files are all there (.conf, .crt, .csr, and .key). Any helpful suggestions would be most welcome.

1 Answers

Okay—thanks to @Rory, the problem is solved! Here are the steps:

  1. Run composer global update.
  2. Run valet restart.
  3. Do valet unsecure my_project, then valet unlink my_project.
  4. Do valet link my_project, then valet secure my_project

...and Bob's your uncle!

Related