Document Root

Discussion in 'General' started by laz99, Mar 2, 2023.

  1. laz99

    laz99 New Member

    Hi, I have over 400 domains and I can create them in ISPconfig via the API as well as there DNS records.

    My question is how would I get them to all use the same root directory?
    I have had to add them in as individual sites rather than alias's as the maximum SSL Subjective Alternative names is 100. (Let's Encrype)

    Basically I want all my 400 domains to point to the same site using its own SSL

    What's the best way to go about this?

    Kindest Regards
    Colin
     
    Last edited: Mar 2, 2023
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Use vhost alias domains in ISPConfig.
     
    ahrasis likes this.
  3. laz99

    laz99 New Member

    Hi, The problem with using alias domains is that it produces a shared certificate with all the alias domains as SAN's and the maximum is 100 per certificate.

    Kindest Regards
    Colin
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm not talking about alias domains. I'm talking about vhost alias domains, something completely different as a host alias domain creates a independent SSL cert for each alias domain and is not using a shared SSL cert. Enable vhost alias and subdomains under System > Interface > main config and then create the additional domains as vhost alias domains.
     
    ahrasis likes this.
  5. laz99

    laz99 New Member

    Thanks Till,
    Is that this setting? Under the Sites heading?
    "Create aliasdomains as web site"

    Kindest Regards
    Colin
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    yes
     
  7. laz99

    laz99 New Member

    Thanks again till, that's exactly what I am looking for.

    I am guessing that a vhost alias can be created via the API? I can't see an example for it in the examples folder.
    But if you could confirm that it is possible. I can then start trying to experiment will the code.

    Kindest Regards
    Colin
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, it should be possible via API, the function is sites_web_vhost_aliasdomain_add($session_id, $client_id, $params)
    Paramteres should be similar to adding a website.
     
    ahrasis likes this.
  9. laz99

    laz99 New Member

    Thanks again, It is all working great now.
    I was able to use the sites_web_vhost_aliasdomain_add function.
     

Share This Page