zuazo / owncloud-cookbook

Chef cookbook to install and configure ownCloud.

Home Page:https://supermarket.chef.io/cookbooks/owncloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add instructions about custom SSL certificates

schmunk42 opened this issue · comments

This is how I solved it, but I am not sure if this is the 100% perfect way:

Using existing SSL certificates

In _apache.rb or _nginx.rb remove the certificate generation and replace it with file paths.

ssl_key_path, ssl_cert_path = generate_certificate

ssl_key_path = '/path/to/private.key'
ssl_cert_path = '/path/to/cert.pem'

I have been thinking of a way to add custom certificates for some time now. Not sure which is the best approach (¿maybe using databags?). I have to think it over.

Just FYI: I tried also a GitLab Vagrant VM recently, they simply have a config option, where you have to enter the source of the cert.

I think I have finally come up with a quite flexible solution. Now you can use a custom certificate from several sources: an attribute, a data bag or a certificate file you have previously created on the machine.

The usage is documented in the README.

That looks really nice.