Create many subdomains with script? (for Lets Encrypt)

Discussion in 'General' started by SLedolter, Jun 21, 2018.

  1. SLedolter

    SLedolter New Member

    Hi all,

    I have the following situation:
    There are two sites on the ISPConfig-Server, one main with www. domain-main. com, and one with domain-main. com and auto-subdomain * . For that sites there are multpile aliases, i.e. www. domain-english. com, www. domain-italy. com and so on (for now there are 15 alias-domains registered, maybe more are coming). On the second site, if you type in f.e. (or, the location1 is checked in the database and if exists, the corresponding data is send (in this case images from that location1).

    Now we need HTTPS on all the sites, till now only the admin-backend was secured, also the backend was forced to use the main domain (so italian locations where called for the frontend and for the backend, cause by only wishing to pay for one wildcard ssl-certificate in the past. This is one thing I want to change back, so that only italian locations will use italian domains, if you call an italian location with austrian domain, it should be redirected.

    For now we have nearly 400 locations in our database, so it would not be very handy to create them with the ISP-interface, although its working. The subdomains I tried manually all got the SSL-certificate.
    Another problem is, that only the subdomain on the main domain got a certificate, for the aliases there is no creation of a certificate.

    2 Sites with 15 domain aliases, one site is the main www, all other "subdomains" are sent to the second site, where they are checked against the database, and if they are available, the required data is send. If the "location" is not available there is a redirection to the main www-site.
    400 "subdomains", which are no real subdomains for now, cause they are only calculated out of the non-www site.

    - the subdomains of the main domain should be included into the certificates created for the alias-domains
    - an easier method to fill in the 400 "subdomains" to ISPConfig

    - if i create an alias "", the certificate is valid. So, is it a better idea to ignore the subdomains and create alls needed domains as alias?

    I hope I wrote everthing so, that at least there is a bit to understand. I you need informations or something claryfied plz ask.

    Edit: had to put blanks into the fake-URLs, cause I am not allowed to post links for now ;)
  2. SLedolter

    SLedolter New Member

    so I found out about remote API, now my only problem is following text in readme-file of the remoting_client-directory in the ispconfig-install-folder:

    - Remote API example files

    The examples folder contains a example script for every
    Remote api function. The login details and URL for the
    remote connection are defined in the file soap_config.php

    - Remote API documentation

    The startpage of the API documentation is main.html​

    Where should be the main.html? Also, the manual about the Remote API seems to be outdated, cause the folders and files in there aren't equal to the ones in the ISP-Config-Directory.
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I was actually looking for this solution too but still am not sure how it should be done. Do share once you figure out the how to.

    What I had in mind was to correctly add the needed alias subdomains to the database, run the resync tool for website (and dns if you use it) and they should already be working.

    Adding LE SSL certs for them is however the tricky especially if you are looking for the wildcard solution. I discussed it in here (post #2) with no definitive conclusion yet.

Share This Page