Wildcard domain and Let's Encrypt for all of them

I want to create wildcard domain with easyengine and enable Let’s encrypt on all of them.

Actually, I want to create the main domain and 4 subdomains that point to the same document root and then use Let’s encrypt on all of them.

Is that possible ?

just create a name records to the same IP so they all point to the same location. Or you can just set cname records to one host record so they point to the same place.

I set these two records so I can auto create new subdomains and they auto work.

.domain www..domain

This allows me to create anything.domain and it points to the same server, and letsencrypt will work also.

Thank you for the reply.

So you create domain with ee site create example.com and then manually edit the nginx config to make it wildcard.

Or is there a possibility to do something like *ee site create .examle.com --letsencrypt ?

no, I do it at my registrar or cloudflare directly with CNAME or A name records.

so I do ee site create anything.domain.com

because I have an A NAME record of *.domain.com pointing to the server IP you could type in whatever.domain.com and it will show the anything.domain.com site.

I understand what you mean. My problem is that I need to create wildcard domain with easyengine as I do my projects in laravel (PHP) and this one project handles 5 domains.

So if you call www.example.com , sub.example.com and sub1.example.com I need to direct it to the same document root.

If I’ll create subdomains with EE it will create separate document roots in /var/www for each of my subdomain so it’ll create /var/www/sub.example.com and /var/www/sub1.example.com and what I need is to point all of them to /var/www/example.com and have Let’s encrypt activated on all of them