Anyone use commandbox and lucee, I'm really strugg...
# lucee
e
Anyone use commandbox and lucee, I'm really struggling with some http calls to my local machine and can't get past some Unknown host: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target errors
f
That error indicates HTTPS calls, not HTTP - maybe that is the problem?
s
means Lucee can't handle the SSL cert, probably because it's locally signed. solution 1: install the cert in lucee admin (or programatically); solution 2: it's localhost, don't use https solution 3: use a front end like nginx and have it handle SSL termination rather than commandbox solution 4: probably some commandbox-y thing where it can handle the self-signed SSL if you tell it about the cert but idk what that is. we do #3
e
I've used the SSL Certificates area in admin, but doesn't seem to do anything for the local cert that I made with mkcert I'm have the cert installed in IIS as the front end was trying to find an option in java or commandbox that would ignore ssl validation... but no luck
s
the way to ignore it is to just use http instead of https. if you have IIS on the front end, it sounds like you're proxying connections to Lucee from IIS, in which case you especially don't need HTTPS there because you've already got it on the front end.
f
if you use mkcert then you can add your CA cert to the trusted certs… you can also try this: https://cfdocs.org/sslcertificateinstall
s
so you can keep https://myapp.localtest.me and just have IIS hit http://localhost:myCommandboxPort instead of https://localhost:myCommandboxPort
👍 1
e
@foundeo I was trying to make it by a little more dynamic so i was calling sslcertificateinstall if the https call returned the PKIX error but no luck... I'll mess around with IIS and see if i can do the bindings to go to http instead of https
f
yeah, I think you might need to add it to the JVM’s cacerts file… in the past lucee used to have its own cacerts file, but this was kind of a bad idea from a security perspective, so at some version they do no longer do that
I think it still supports having a cacerts file bundled managed by lucee, might need to turn it on with an env variable or something, in that case the sslCertificateInstall function might start working
b
You have to restart after installing the cert. Did you do that?