Changing document root to another domains document root

Discussion in 'Installation/Configuration' started by logansbob, Feb 7, 2024.

  1. logansbob

    logansbob New Member

    I want to change the document root from of "domain xy" (/var/www/clients/client1/web36) to execute the scripts located in "domain yz" (/var/www/clients/client1/web42)
    (For a Wordpress multiple domain/subdomain setup)

    I was reading some post in this forum and tried setting on "domain xy" the following directives (one after the other) in "Apache Directives", but none did work...
    DocumentRoot "/var/www/clients/client1/web42"
    DocumentRoot /var/www/clients/client1/web42
    DocumentRoot "/var/www/clients/client1/web42/web"
    DocumentRoot /var/www/clients/client1/web42/web

    What am I doing wrong?
     
    Last edited: Feb 7, 2024
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I think that is not possible simply because each have different ownership. Try using sub domain vhost / alias domain vhost for WP MU instead.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    This can not work as each website runs under a different Linux user.

    For such a setup, you do not alter the web root. Instead, add the additional domains as Alias and/or Subdomains to the website. You find alias and subdomains in the menu on the left side in ISPConfig. Alias and subdomains are especially made for such multidomain CMS as they configure additional domains for a site while keeping the same website root directory.
     
    ahrasis likes this.
  4. logansbob

    logansbob New Member

    Thanks for your answers...
    I tried to set up a aliasdomain like this:

    Domain: xyz.com
    Parent Website: abc.com :: server.com
    Redirect Type: No redirect
    Redirect Path: https://abc.com
    Auto-Subdomain: none
    SEO Redirect: No redirect

    This does not work...
    I want it the domain xyz.com load the files from abc.com
    How can I archive this?
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Did you create xyz.com site inside abc.com wp mu panel?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You must empty the field redirect_path.
     

Share This Page