Bulk action, automate activation HTTPS

MartijnB

New member
Joined
Oct 24, 2013
Messages
3
Hi,
We want to do a bulk edit on ~150 domains. The problem we have is that these domains don't have valid HTTPS connections (no SSL certificate).
So when you browse to a domain you are using a HTTP connection. And we want to force a HTTPS connection with a Lets encrypt certificate.

You can do this manually by doing:
- Domain Setup -> [domain] -> Select: Secure SSL
- Click save
- Domain Setup -> [domain] -> Select: Use a symbolic link from private_html to public_html - allows for same data in http and https
- Domain Setup -> [domain] -> Select: Force SSL with https redirect
- Click save
- Domain Setup -> [domain] -> Select in "PHP selector" PHP7 (not needed but we don't want to use PHP5)
- Click save
- SSL Certificates -> Free & automatic certificate from Let's Encrypt
- Click save

We want to automate the steps above.

We already found a way to generate LE certificates by doing:
* ./letsencrypt.sh request_single domain.com,www.domain.com 4096
But this requires a manual action, you must select "Paste a pre-generated certificate and key" in "Domain Setup -> [domain]".

Is there a way to fully automate this?
Probably by using the DirectAdmin API?
 
Top