How To: Customize the Apache DocumentRoot ========================================= The Apache DocumentRoot can be changed via an Apache vhost include. .. note:: While the vhost include, itself, will persist if the domain is restored or imported from a backup, the symlink that is required for Let's Encrypt and other domain verification tools will not. If the domain is restored from a backup or imported to a new server, the symlink will have to be recreated. Skip to step 6 for instructions on how to create the required symlink. To Update a Single Domain ------------------------- #. Log in to the server at the CLI as root, either via SSH or from the terminal #. Make sure the desired DocumentRoot directory has the correct permissions. The directory should be both user and group owned as the unixuser, with 2711 permissions .. code-block:: chown {unixuser}:{unixuser} /home/{unixuser}/{/path/to/docroot}/ chmod 2711 /home/{unixuser}/{/path/to/docroot}/ #. Use the following command to create a new file named ``doc_root.conf`` in the domain's ``/home/{unixuser}/var/{domain}/apache/`` directory, and add the path to the desired DocumentRoot to that file: .. code-block:: echo DocumentRoot "/home/{unixuser}/{/path/to/docroot}/" > /home/{unixuser}/var/{domain}/apache/doc_root.conf #. Make sure the file has the correct permissions. It should be user and group owned as the unixuser .. code-block:: chown {unixuser}:{unixuser} /home/{unixuser}/var/{domain}/apache/doc_root.conf #. Reload Apache .. code-block:: systemctl reload httpd #. Backup the domain's ``/home/{user}/{domain}/html`` folder .. code-block:: mv /home/{user}/{domain}/html/ /home/{user}/{domain}/html.bak #. Create a symlink from the default DocumentRoot location to the new, desired DocumentRoot directory .. code-block:: ln -s /home/$user/$path_to_docroot /home/$user/$domain/html #. Make sure the symlink has the correct permissions. It should be user and group owned as the unixuser .. code-block:: chown -h {unixuser}:{unixuser} /home/{unixuser}/{domain}/html