What is the document root for a subdomain?

Discussion in 'Installation/Configuration' started by Fafa24, Oct 6, 2025 at 6:03 PM.

  1. Fafa24

    Fafa24 Member

    Hi,

    I'm not sure what is the default document root for a subdomain when I set it with subdomain for website in the GUI?

    Is it also possible to change it to a different subfolder in the main website?

    I have done it in Apache Directives

    For the subdomain I want to use
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    A subdomain is an alias of the website, so it has no separate docroot. If you want to have a subdomain that has its own folder, then either create a new website for the subdomain (that's the best option, security-wise), or create it as a subdomain vhost.
     
  3. Fafa24

    Fafa24 Member

    Thanks for the new website. I could point the document root to the main site/subfolder? I guess yes.
    When creating a subdomain vhost, I don't see such an option in the Web GUI. Would I need to do that in the console?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No. A new site is a new site and has a new web folder. If there is any special reason why this subdomain shall point to a subfolder of ananother site, use a vhost subdomain.

    No. You probably mix up a subdomain and a vhost subdomain.
     

Share This Page