How to setup ssl on homestead? [closed]

I want to ask you one thing. I’ve just started using homestead and I’m having a problem. Not sure how to set up SSL on Homestead.

From what I searched and understood, I found that the SSL certificate for the projects I’m working on is located in vagrant@homestead:/etc/ssl/certs$ and should be used in homestead.yaml as in the example below.

sites:
– map: projectName.test
to: /home/vagrant/laravelProjects/projectName/public
ssl: true
ssl_certificate: “/etc/ssl/certs/projectName.test.crt”
ssl_certificate_key: “/etc/ssl/certs/projectName.test.key”

However, when running the vagrant reload –provision command, as in the example mentioned above, the following error appeared.

$ vagrant reload –provision
There are errors in the configuration of this machine. Please fix
the following errors and try again:

shell provisioner:

  • Shell provisioner args must be a string or array.

I tried to write it in this way as well.

sites:
– map: projectName.test
to: /home/vagrant/laravelProjects/projectName/public
ssl: true
ssl_certificate: /etc/ssl/certs/projectName.test.crt
ssl_certificate_key: /etc/ssl/certs/projectName.test.key

Had the same error. Now I really don’t understand what exactly is wrong. I would really appreciate your advice on how to set up ssl on homestead.

Leave a Comment