bsyk / cf-letsencrypt

Let's Encrypt wrapper for Cloud-Foundry
MIT License
27 stars 22 forks source link

Print correct locations for cf files commands (Issue #3) #5

Closed jlstack closed 8 years ago

jlstack commented 8 years ago

It appears that there is an issue requesting multiple hosts for a singular domain. This fix assumes that the bug will be addressed.

bsyk commented 8 years ago

I'm not sure it's this simple. I think if you have just a single host, the fqdn will be the folder name, otherwise it's the first domain. There is just 1 set of certificates for all hosts/domains.

I was thinking that it might be easier to just zip everything under app/conf/live and suggest cf files of that zip file. What do you think?

bsyk commented 8 years ago

This comment shows what you get with multiple hosts/domains.

jlstack commented 8 years ago

Based on my experience, I think the only reason the fqdn will be the folder name is because the first host you list is '.'. If you were to feed it one host that is not '.', I do not believe this would be the case.

bsyk commented 8 years ago

You're totally right. I'm a creature of habit, always listing the '.' host first it seems!

bsyk commented 8 years ago

This fix is not quite right. Only a single certificate is generated by the scripts, it has all the hosts/domains listed as alternate names in the single certificate. The new logging output now generates something like this, yet the certificate is just in the directory named after the first entry in the domains.yml file.

OUT Done.
OUT Fetch the certs and logs via cf files ...
OUT You can get them with these commands: 
OUT cf files letsencrypt app/conf/live/sample.bsyk.es/cert.pem
OUT cf files letsencrypt app/conf/live/sample.bsyk.es/chain.pem
OUT cf files letsencrypt app/conf/live/sample.bsyk.es/fullchain.pem
OUT cf files letsencrypt app/conf/live/sample.bsyk.es/privkey.pem
OUT ()
OUT cf files letsencrypt app/conf/live/bsyk.es/cert.pem
OUT cf files letsencrypt app/conf/live/bsyk.es/chain.pem
OUT cf files letsencrypt app/conf/live/bsyk.es/fullchain.pem
OUT cf files letsencrypt app/conf/live/bsyk.es/privkey.pem
OUT ()
OUT cf files letsencrypt app/conf/live/www.bsyk.es/cert.pem
OUT cf files letsencrypt app/conf/live/www.bsyk.es/chain.pem
OUT cf files letsencrypt app/conf/live/www.bsyk.es/fullchain.pem
OUT cf files letsencrypt app/conf/live/www.bsyk.es/privkey.pem
OUT ()
OUT cf files letsencrypt app/conf/live/host.bsyk.uk/cert.pem
OUT cf files letsencrypt app/conf/live/host.bsyk.uk/chain.pem
OUT cf files letsencrypt app/conf/live/host.bsyk.uk/fullchain.pem
OUT cf files letsencrypt app/conf/live/host.bsyk.uk/privkey.pem
OUT ()
OUT REMEMBER TO STOP THE SERVER WITH cf stop letsencrypt

ben$ cf files letsencrypt app/conf/live
Getting files for app letsencrypt in org bsyk / space dev as ben@bsyk...
OK

sample.bsyk.es/