Hi!
I'm trying to add tls support to obhttpd.
i've used acme.sh for issuing a certificate for my domain:
Then install them:
After that i've edit the configuration of obhttpd in /usr/local/etc/obhttpd:
But when i try to start obhttpd with:
i got this error:
Am i missing something?
I'm trying to add tls support to obhttpd.
i've used acme.sh for issuing a certificate for my domain:
Code:
# change ownership temporarily to user:acme group:acme
chown acme:acme /usr/local/www/your-web-site-dir
su acme
acme.sh --issue -d www.example.com -w /usr/local/www/your-web-site-dir
# restore ownership back to whatever user it was.
chown www:www /usr/local/www/your-web-site-dir
Then install them:
Code:
mkdir -p /usr/local/etc/obhttpd/ssl/www.example.com/
touch /usr/local/etc/obhttpd/ssl/www.example.com/fullchain.cer
touch /usr/local/etc/obhttpd/ssl/www.example.com/www.example.com.key
touch /usr/local/etc/obhttpd/ssl/www.example.com/www.example.com.cer
chown -R acme:acme /usr/local/etc/obhttpd/ssl/www.example.com
# run the script as user “acme”
su acme
acme.sh --install-cert -d www.example.com \
--cert-file /usr/local/etc/nginx/ssl/www.example.com/www.example.com.cer \
--key-file /usr/local/etc/nginx/ssl/www.example.com/www.example.com.key \
--fullchain-file /usr/local/etc/nginx/ssl/www.example.com/fullchain.cer
After that i've edit the configuration of obhttpd in /usr/local/etc/obhttpd:
Code:
chroot "/usr/local/www:
server "www.example.com" {
listen on * tls port 443
root "/htdocs/example.com"
tls {
certificate "/usr/local/etc/obhttpd/ssl/www.example.com/fullchain.pem"
key "/usr/local/etc/obhttpd/ssl/www.example.com/www.example.com.key"
}
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
}
But when i try to start obhttpd with:
Code:
# obhttpd -d -v
i got this error:
Code:
/usr/local/etc/obhttpd.conf:13: server "www.example.com": failed to load public/private keys
Am i missing something?