How to setup website with multiple subsites

Discussion in 'General' started by ggallo, Sep 6, 2023.

  1. ggallo

    ggallo New Member

    Hi All!

    I'm facing a problem I cannot solve. Maybe one of you can help me out.

    A customer requested a new website, that will host a complete YII webapp with frontend, backend and REST API modules. All 3 modules must be accessible on a customer defined FQDN, which must use the below folder structure withing the (only one) website:
    website:/web/backend/web - accounting.domain.com
    website:/web/rest/web/ - api.accounting.domain.com
    website:/web/frontend/web - users.domain.com

    Unfortunately (for this request) the "main" domain.com site (and www.domain.com) already exists and contains the main website of the customer. Nobody wanted to place the above new YII app inside this website's storage.

    I can create accounting.domain.com as a website, with modified DOCROOT pointing to /web/backend/web, and I can create a Subdomain (vhost) entry for the api.accounting.domain.com to server the /web/rest/web DOCROOT from accounting.domain.com.
    But I can't figure out how to create the user.domain.com with the /web/frontend/web DOCROOT within the accounting.domain.com site.
    I created the user.accounting.domain.com Subdomain (vhost) entry, but the customert not asked for this.
    I cannot create an aliasdomain for a Subdomain (vhost), only for a "real" website entry...

    I cannot figure this out myself.
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Why is that? Have you tried it? I mean create user.domain.com as alias domain (vhost) to accounting.domain.com and while doing that set the web folder to the intended /web/frontend/web? It should work IMHO.
     
  3. ggallo

    ggallo New Member

    Yes, I tried. I created user.domain.com as a Subdomain (vhost) for website accounting.domain.com. The resulting Subdomain was user.comain.com.accounting.domain.com. ISPconfig appended the whole FQON of the website to the subdomain name I gave...
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    No. I said, alias domain (vhost).
     
  5. ggallo

    ggallo New Member

    Alias domain (vhost) is not an available option in ISPconfig 3.2.9 which we run currently.
    "Normal" aliasdomain form has a list of websites to alias (not a freetype field), and that list does not contain Subdomain (vhost) entries, only entries from Website list. But I do not wanr to alias the "main" site, I want to alias the subsite which served from a subdirectory of the main site.
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You have to activate it just like you activated sub domain (vhost). ISPConfig GUI > System > Interface > Main Config.
     

Share This Page