Changing root directory?

Discussion in 'Installation/Configuration' started by Akhilleus, Jul 14, 2019.

  1. Akhilleus

    Akhilleus Member

    Hello;

    Usually the root directory is located under : /var/www/clients/client1/web1 ( as an example )
    It is possible to change it ? For example make the main directory on a subdirectory . The public_html is /var/www/clients/client1/web1/web , and I want to make it be : /var/www/clients/client1/web1/web/example .

    Is that possible ? Or I need to redirect via DNS only ?
     
  2. ahrasis

    ahrasis Well-Known Member

    I don't think so but default access via ssh is ../web1/home or something...
    This is possible via vhost, where I think you just need to customize it a bit.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You can customize the document root of a website through the Apache or Nginx Directives field on the options tab of the website.
     
    ahrasis likes this.
  4. Akhilleus

    Akhilleus Member

    @till Customizing it from Apache make it edited for all websites , isn't it ? I want to make it /var/www/html/videos only for 1 of my sites . Is that possible ? In case of yes , could you provide the command line to edit it ?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    No, I'm not talking about altering the master file. I suggested that you add a new DocumentRoot directive in the Apache Directives field on the options tab of this one website.
     
  6. Akhilleus

    Akhilleus Member

    @till You mean like Vhost ? Please give me the command to edit it . I will google more , just provide the command line please
     
  7. Akhilleus

    Akhilleus Member

    @till Ok , I see what you're talking about . You mean the Snippets . But how do I add what I want there ? I can see only 2 variables
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm not talking about snippets and not about editing any files or vhosts. On the options tab of the website, there is a text field named apache directives and there you add a new DocumentRoot directive.

    e.g.:

    Code:
    DocumentRoot /var/www/clients/client1/web1/web/example
     
    Last edited: Jul 15, 2019
  9. Akhilleus

    Akhilleus Member

    upload_2019-7-15_18-48-36.png

    Should be looking like this ? Or I do need to add at the start ''DocumentRoot'' ? And what is
    Code:
     ? What code should I add there ?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    No. I posted above what you should add. Again:

    DocumentRoot /var/www/clients/client1/web1/web/example
     
    Akhilleus and ahrasis like this.
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Akhilleus, ahrasis and till like this.
  12. Akhilleus

    Akhilleus Member

    ahrasis likes this.
  13. ahrasis

    ahrasis Well-Known Member

Share This Page