Monday 19 October 2020

Creating a Secured Laravel Homestead SSH

Open Homestead.yaml file and add SSL = true it will create crt file in /etc/nginx/ssl


Sample Homestead.yaml file
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:

    - map: /Users/junedc/Desktop/AMyProject/

      to: /home/vagrant/code1/


    - map: /Users/junedc/Desktop/AMyProject2/

      to: /home/vagrant/code2/


sites:

    - map: backend.test

      to: /home/vagrant/code1/backend_template/public


    - map: laravel8.test

      to: /home/vagrant/code2/laravel8/public


ssl:
     - true

Some commands to generate ssh key,  create a certificate, reload the new settings

xxxx
 ssh-keygen -t rsa
 vagrant up 
 vagrant ssh 
 cp cafefrends.test.crt /home/vagrant/code/cafefrends 
 
 vagrant halt
 vagrant reload --provision


In your mac KeyChain Access Add the crt file that was created in the previous step and set the SSL to 'Always Trust'
Share:

Popular Posts

Recent Posts

Pages

Powered by Blogger.

About Me

My photo
For the past 10 years, I've been playing with codes using PHP, Java, Rails. I do this for a living and love new things to learn and the challenges that comes with it. Besides programming I love spending time with friends and family and can often be found together catching the latest movie or planning a trip to someplace I've never been before.