I have a suggestion regarding the Document Root setting

Discussion in 'HOWTO-Related Questions' started by Matz Sor, Jul 6, 2026 at 8:10 PM.

  1. Matz Sor

    Matz Sor New Member

    Hello everyone,

    I have a suggestion regarding the Document Root setting, which is reflected in /etc/nginx/sites-available/{domain.vhost}.

    It would be very helpful if the Document Root field in the Sites form:

    <div class="form-group">
    <label for="document_root" class="col-sm-3 control-label" readonly="">Document Root</label>
    <div class="col-sm-9">
    <div class="checkbox">/var/www/clients/client0/web8</div>
    </div>
    </div>
    could be changed to an actual editable input field instead of being displayed as read-only text. This would make it much easier to customize the document root when needed, without having to manually edit the generated virtual host configuration.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can customize the docroot using the Apache or Nginx directives field on the Options tab. Do not manually edit the vhost config file, all manual changes will get removed from the config when you edit the site.
     
    ahrasis and Matz Sor like this.
  3. remkoh

    remkoh Well-Known Member HowtoForge Supporter

    You should never ever manually customize virtual host configurations!
    It will be undone with every change you make within ispc.

    If an application forces you to have a different document root than the default web folder you should use the "##subroot <subfolder> ##" within ispc.
    When the application is outside of the website folders (for example in /usr/share) than you create a symlink to that folder in the web folder and use it as subroot folder in the config.
     
    ahrasis, Matz Sor and till like this.
  4. Matz Sor

    Matz Sor New Member

    Thank you very much for your reply, Till.

    I was manually editing and testing the Nginx configuration before reloading it. I thought that since the configuration was already defined in the vhost, it wouldn't accept another one overriding it.

    It worked perfectly here. Thanks!
     
  5. Matz Sor

    Matz Sor New Member

    Thank you for the detailed explanation! I really appreciate the information. I'll follow that approach. Thanks again!
     

Share This Page