Answers.Body: <p>It starts with a peculiarity of DirectAdmin. Using a subdomain, you have to upload the files for <strong>https</strong> connection to <code>private_html</code> and the files for not secure <strong>http</strong> connection to <code>public_html</code>. For the situation these files are the same DirectAdmin offers the option to create a  symbolic link from <code>private_html</code> to <code>public_html</code>. Thus when you ask for <code>https://&lt;domain&gt;/file.html</code> it looks for the file <code>/private_html/file.html</code> and thanks to the link this is the same as <code>public_html/file.html</code>.</p>
  
  <p>The <code>[cms.root]</code> variabele is not set. It is derived from the <code>DRUPAL_ROOT</code> constant, that is calculated with <code>getcwd()</code>. At the moment you use a secure connection this functions returns the <code>private_html</code> directory.</p>
  
  <p>And it causes trouble.</p>
  
  <p>The directory variable  <code>[cms.root]</code> is used to calculate the URL variabele <code>[civicrm.root]</code> so this is also wrong. The effect is that a lot of javascript files are not found, for example <code>ckeditor.js</code>.</p>
  
  <p>My solution is adding the <code>[cms.root]</code> directly to the <code>civicrm.settings.php</code> file with the following line:</p>
  
  <pre><code>$civicrm_paths['cms.root']['path'] = '/home/&lt;user&gt;/domains/&lt;subdomain&gt;/public_html/crm';
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-14T20:29:44.097Z
Answers.LastActivityDate: 2017-12-14T20:29:44.097Z
Answers.UserDisplayName: Kainuk - CiviCooP
Body: <p>The <em>Settings - Upload Directories</em> screen (url <code>civicrm/admin/setting/path?reset=1</code>) makes it possible to examine the value of the <code>[cms.root]</code> variable. Just click the first help question mark.</p>
  
  <p>In my case the <code>cms.root</code> path contains the directory <code>private_html</code>. That is a bit strange because I installed CiviCRM in the <code>public_html</code> directory and also added this path to the <code>$civicrm_root</code> variable. </p>
  
  <p>Why is this, and does it harm?</p>
  
  <p>More details: The CiviCRM version is 4.7.27 on Drupal. It runs on a VPS administered with DirectAdmin, and https is enabled.</p>
  
Tags: <installation><civicrm.settings.php><directory>
Title: Why is there private_html in my [cms.root] directory variable and is it trouble?
ThreadText: # Why is there private_html in my [cms.root] directory variable and is it trouble?
  
  (Asked by: username_0 on 2017-12-14)
  
  The *Settings - Upload Directories* screen (url `civicrm/admin/setting/path?reset=1`) makes it possible to examine the value of the `[cms.root]` variable. Just click the first help question mark.
  
  In my case the `cms.root` path contains the directory `private_html`. That is a bit strange because I installed CiviCRM in the `public_html` directory and also added this path to the `$civicrm_root` variable.
  
  Why is this, and does it harm?
  
  More details: The CiviCRM version is 4.7.27 on Drupal. It runs on a VPS administered with DirectAdmin, and https is enabled.
  
  **Tags:** installation, civicrm.settings.php, directory
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-14. Score: 1
  
  It starts with a peculiarity of DirectAdmin. Using a subdomain, you have to upload the files for **https** connection to `private_html` and the files for not secure **http** connection to `public_html`. For the situation these files are the same DirectAdmin offers the option to create a symbolic link from `private_html` to `public_html`. Thus when you ask for `https://<domain>/file.html` it looks for the file `/private_html/file.html` and thanks to the link this is the same as `public_html/file.html`.
  
  The `[cms.root]` variabele is not set. It is derived from the `DRUPAL_ROOT` constant, that is calculated with `getcwd()`. At the moment you use a secure connection this functions returns the `private_html` directory.
  
  And it causes trouble.
  
  The directory variable `[cms.root]` is used to calculate the URL variabele `[civicrm.root]` so this is also wrong. The effect is that a lot of javascript files are not found, for example `ckeditor.js`.
  
  My solution is adding the `[cms.root]` directly to the `civicrm.settings.php` file with the following line:
  
  ```
  $civicrm_paths['cms.root']['path'] = '/home/<user>/domains/<subdomain>/public_html/crm';
  
  ```
  
  
  ---
  
  