Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docksal : How can I enable HTTPS / SSL?

I'm using Docksal, but I want to use HTTPS/SSL.

Now I am able to navigate to my site by going to the https://-domain, but my browser shows that the certificate is invalid (the certificate is from "Internet Widgits Pty Ltd").

I cannot seem to find something in the documentation on how to enable https. It only states that the web service uses self-signed certificates, but these are not allowed by my system (unlink Valet+ for example, which installs the self-signed certificates for you).

Can anyone point me in the right direction on how to enable HTTPS/SSL?

like image 417
Giel Berkers Avatar asked Feb 01 '26 23:02

Giel Berkers


1 Answers

  1. Put your certificates for your project's virtual host into $HOME/.docksal/certs. E.g. if your project's virtual host is example.com then put CRT and KEY files as:
$HOME/.docksal/certs/example.com.crt
$HOME/.docksal/certs/example.com.key
  1. If you never had $HOME/.docksal/certs directory before you will need to do fin system reset for docksal-vhost-proxy to find it
  2. In your project set environment variable
VIRTUAL_HOST_CERT_NAME="example.com"
  1. Restart the project with fin project restart
like image 140
Oleksii Chekulaiev Avatar answered Feb 04 '26 15:02

Oleksii Chekulaiev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!