Search code examples
ssl-certificatevagranthomestead

vagrant ssh homestead ssl folder is missing


The ssl folder is missing from my Homestead Vagrant Box.

I have ssl set to true in my .ymal file:

ip: "192.168.56.56"
memory: 2048
cpus: 2
provider: virtualbox
ssl: true

I have done vagrant provision after changing that.

I vagrant ssh into the machine and navigate to where the ssl folder should be in etc/nginx and it's not there.

$ vagrant ssh
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-91-generic x86_64)

 _                               _                 _
| |                             | |               | |
| |__   ___  _ __ ___   ___  ___| |_ ___  __ _  __| |
| '_ \ / _ \| '_ ` _ \ / _ \/ __| __/ _ \/ _` |/ _` |
| | | | (_) | | | | | |  __/\__ \ ||  __/ (_| | (_| |
|_| |_|\___/|_| |_| |_|\___||___/\__\___|\__,_|\__,_|

* Homestead v13.0.1 | Thanks for using Homestead
* Settler v12.0.0


Last login: Mon Dec 20 14:37:59 2021 from 10.0.2.2
vagrant@homestead:~$ cd ../../etc/nginx/
vagrant@homestead:/etc/nginx$ ls -la
total 80
drwxr-xr-x   8 root root  4096 Dec  5 03:05 .
drwxr-xr-x 128 root root 12288 Dec 20 15:04 ..
drwxr-xr-x   2 root root  4096 Dec  5 03:05 conf.d
-rw-r--r--   1 root root  1077 Feb  4  2019 fastcgi.conf
-rw-r--r--   1 root root  1007 Feb  4  2019 fastcgi_params
-rw-r--r--   1 root root  2837 Feb  4  2019 koi-utf
-rw-r--r--   1 root root  2223 Feb  4  2019 koi-win
-rw-r--r--   1 root root  3957 Feb  4  2019 mime.types
drwxr-xr-x   2 root root  4096 May 25  2021 modules-available
drwxr-xr-x   2 root root  4096 Dec  5 03:05 modules-enabled
-rw-r--r--   1 root root  1487 Dec  5 03:05 nginx.conf
-rw-r--r--   1 root root   180 Feb  4  2019 proxy_params
-rw-r--r--   1 root root   636 Feb  4  2019 scgi_params
drwxr-xr-x   2 root root  4096 Dec 20 15:04 sites-available
drwxr-xr-x   2 root root  4096 Dec 20 15:04 sites-enabled
drwxr-xr-x   2 root root  4096 Dec  5 03:05 snippets
-rw-r--r--   1 root root   664 Feb  4  2019 uwsgi_params
-rw-r--r--   1 root root  3071 Feb  4  2019 win-utf

Is there a way to generate the homestead ssl certificates?


Solution

  • In a newer Homestead, the directory is /etc/ssl/certs.
    Then I copied ca.homestead.homestead.crt file to the project folder, and got my browser to load the cert.

    https://sternerstuff.dev/2019/03/trust-laravel-homestead-ssl-certificates/