litespeedtech / ols-docker-env

OpenLiteSpeed Docker Environment
MIT License
199 stars 132 forks source link

Applying a ZeroSSL Certificate #84

Open mmojadad opened 2 months ago

mmojadad commented 2 months ago

Hi When i Applying a ZeroSSL Certificate i get following error message :

No EAB credentials found for ZeroSSL, let's obtain them Cannot resolve _eab_id [Fri Sep 6 18:40:51 EDT 2024] Please add '--debug' or '--log' to see more information. [Fri Sep 6 18:40:51 EDT 2024] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

I try switch to Letsencrypt ( It's a must for me ), And try bash bin/acme.sh --set-default-ca --server letsencrypt

OPTIONS -D, --domain [DOMAIN_NAME] Example: acme.sh --domain example.com will auto detect and apply for both example.com and www.example.com domains. -H, --help Display help and exit. Only for the First time --install --email [EMAIL_ADDR] Will install ACME with the Email provided -r, --renew Renew a specific domain with -D or --domain parameter if posibile. To force renew, use -f parameter. -R, --renew-all Renew all domains if possible. To force renew, use -f parameter. -f, -F, --force Force renew for a specific domain or all domains. -v, --revoke Revoke a domain. -V, --remove Remove a domain.

mmojadad commented 2 months ago

Finally i found a way , I updated acme.sh DEFAULT_CA=$CA_LETSENCRYPT_V2_TEST DEFAULT_STAGING_CA=$CA_ZEROSSL Then cert generated but maybe in wrong place

[Fri Sep 6 19:33:14 EDT 2024] Your cert is in: /root/.acme.sh/certs/mydomain.com_ecc/mydomain.com.cer [Fri Sep 6 19:33:14 EDT 2024] Your cert key is in: /root/.acme.sh/certs/mydomain.com_ecc/mydomain.com.key [Fri Sep 6 19:33:14 EDT 2024] The intermediate CA cert is in: /root/.acme.sh/certs/mydomain.com_ecc/ca.cer [Fri Sep 6 19:33:14 EDT 2024] And the full-chain cert is in: /root/.acme.sh/certs/mydomain.com_ecc/fullchain.cer

Folder in following path is empty! /OpenLiteSpeed/ols-docker-env/sites/mydomain.com/certs

And https://mydomain.com return Your connection is not private

mmojadad commented 2 months ago

As i notice my VM using Ubuntu 20.0.4, after Creating a Domain and Virtual Host

bash bin/domain.sh [-A, --add] example.com As i see new Virtual Host not add in OpenLiteSpeed Web GUI > Virtual Hosts > Summary Just Example row is in Virtual Host List. I don't know if this issue is relate to Ubuntu version or not.

Code-Egg commented 1 month ago

To use zerossl's ACME service, you have to create and use EAB (External Account Binding) credentials within your ZeroSSL dashboard. To generate EAB credentials click "Generate" at the bottom of the Developer section of your ZeroSSL management console or use the ACME REST API.

ols-docker-env uses virtual host template by default. If you want to customize for a spefici virtual host, please follow this guide to transfer it to a dedicated virtual host.