How To: Customize the Apache DocumentRoot

The Apache DocumentRoot can be changed using the InterWorx Config System.

This change will persist if the domain is restored or imported from a backup.

To Update a Single Domain

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Run the following command, specifying the domain and path to the desired DocumentRoot:

    ~iworx/bin/config.pex --set --domain {domain} --name HTTPD_DOCUMENT_ROOT --value /home/{unixuser}/{/path/to/docroot}/
    
  3. Rewrite the vhost file for the domain

    ~iworx/bin/httpd.pex --write-vhost --domain {domain}
    
  4. Reload Apache

    systemctl reload httpd.service