0

I need to install a trusted certificate for Laravel Valet (For working locally), I've installed it on my live Ubuntu servers with no problems.

Example on how I installed on Ubuntu:

  1. Installed the certificate inside this location /usr/local/share/ca-certificates/
  2. Then ran sudo update-ca-certificates
  3. sudo reboot
  4. Then it works a charm

Trying to do the same with Lavavel Valet on local

  1. Installed the certificate inside this location Users/<user>/.config/valet/Certificates/
  2. Restart valet
  3. Doesn't work

Is there an equivalent of update-ca-certificates for MacOs or Valet?

I've also installed the certificate on the MacOs keychain with no luck.

Any suggestions?

Vinnie
  • 81
  • 4

2 Answers2

0

If you run brew info openssl you will get a message with instructions like the following:

To add additional certificates, place .pem files in /usr/local/etc/openssl@1.1/certs

and run /usr/local/opt/openssl@1.1/bin/c_rehash I'm pretty sure this is essentially the same as the update-ca-certificates on Ubuntu.

Vinnie
  • 81
  • 4
0

Go into your site directory and run valet secure.

That will give you some additional site configuration in your ~/.config/valet/Nginx directory. It will also give you some automatically generated certificates in your ~/.config/valet/Certificates directory.

You can replace the certificate files it uses with whatever you'd like and adjust the configuration file to suit your needs as well. There may be an easier way but this is typically what I do.

You can also use the valet unsecure command in your site directory to reverse this.

JR Lawhorne
  • 3,192
  • 4
  • 31
  • 41