Wildcard certificate for *.domain.com

This is my caddyfile

1837jewel.com {
root /var/www/html/
*.1837jewel.com {
tls {
max_certs 5000
root /var/www/html/

1837jewel.com worked
*.1837jewel.com sometimes works and sometimes does not work. Chrome browser gives warning.

The domain with name.com default nameservers.
DNS Records:
A *.1837jewel.com

A 1837jewel.com

I guess I need a wildcard certificate for all subdomains. Anyone has a code example of this?

This article tells Environment Variables to Set. Where do I do this? in a caddyfile?

*.xxx.com {
proxy / https://example.com
tls wildcard.crt wildcard.key
Does this code work?

In the environment of your operating system: Environment variable - Wikipedia

If you have a wildcard certificate from another source and supply it to Caddy, that configuration will use it. Supplying your own certificate breaks Automatic HTTPS, so you will need to configure the HTTP and HTTPS listeners manually (or your wildcard site will be served on the default port instead).

Finally I cannot work out on https for *.domain.com. thanks for help anyway

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.