So to begin, I am self hosting an instance of pihole.
I have a domain name which I shall call pi.example.com
And I made my cert by running the command sudo certbot --manual certonly --preferred-challenges dns
which all went fine.
I then merged the privkey.pem and cert.pem from the /etc/letsencrypt/live/pi.example.com/ directory to make a combined.pem
then added to my lighttpd.conf file
#Loading openssl
server.modules += ( "mod_openssl" )
setenv.add-environment = ("fqdn" => "true")
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/combined.pem"
ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.3", "Options" => "-ServerPreference")
}
Now this is where my issue arrives, I have an application which relies on the website and when its run using curl
I get this output when running with -v
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
I have tried to install lets encrypt rootCA which seemed to do nothing most likely since it was already installed and various other things which have all given me the same result
I'm very new to SSL and certs and don't really know what I am doing but trying to learn, trying to fix this issue for a while to no luck.
Hope you can provide me some help or some suggestions to lead me in the right direction.
Thanks.