avisonjohn
New member
- Joined
- Apr 12, 2022
- Messages
- 3
Scenario
I have a scenario where I need users (external users, not any of our hosted customers) to be able to create a subdomain and associated A record (all on their own external domain registrar) and point the A record to one of the IP addresses hosted on our DirectAdmin server.
The users then submit their chosen subdomain to us and they are saved into a database.
I now need to be able to programmatically generate a LetsEncrypt certificate for each of the subdomains in the database, and install it onto our server, so that when somebody visits the subdomain, it is served via HTTPS via our server.
All subdomains will be serving the same single PHP file from the same directory - the PHP file will apply the relevant branding based on the hostname received.
Also, I'll need to be able to programmatically update Apaches config files to server these subdomains, and also point to the corresponding certificate file.
Actual question
Am I able to use the /usr/local/directadmin/scripts/letsencrypt.sh file to generate these certificates, without it affecting any other certificates/domains that are actually hosted on our server?
I also have a feeling that if this is actually possible, will I encounter the error telling me that the domain is not owned by a particular user or not configured on our DirectAdmin instance?
Can anybody offer any insight, or alternative solutions?
I have a scenario where I need users (external users, not any of our hosted customers) to be able to create a subdomain and associated A record (all on their own external domain registrar) and point the A record to one of the IP addresses hosted on our DirectAdmin server.
The users then submit their chosen subdomain to us and they are saved into a database.
I now need to be able to programmatically generate a LetsEncrypt certificate for each of the subdomains in the database, and install it onto our server, so that when somebody visits the subdomain, it is served via HTTPS via our server.
All subdomains will be serving the same single PHP file from the same directory - the PHP file will apply the relevant branding based on the hostname received.
Also, I'll need to be able to programmatically update Apaches config files to server these subdomains, and also point to the corresponding certificate file.
Actual question
Am I able to use the /usr/local/directadmin/scripts/letsencrypt.sh file to generate these certificates, without it affecting any other certificates/domains that are actually hosted on our server?
I also have a feeling that if this is actually possible, will I encounter the error telling me that the domain is not owned by a particular user or not configured on our DirectAdmin instance?
Can anybody offer any insight, or alternative solutions?