title: How to customize vhost file for a WHM-CPanel host?
body: <p>I want to change the document root for a particular host.</p>
  
  <p>Currently the setting for the host is :</p>
  
  <pre><code>&lt;VirtualHost 123.164.132.142:80&gt;
    ServerName abc.com
    ServerAlias mail.abc.com www.abc.com
    DocumentRoot /home/abc/public_html
    ServerAdmin webmaster@abc.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/abc.com combined
    &lt;IfModule log_config_module&gt;
      &lt;IfModule logio_module&gt;
        CustomLog /usr/local/apache/domlogs/abc.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
      &lt;/IfModule&gt;
    &lt;/IfModule&gt;
    ## User abc # Needed for Cpanel::ApacheConf
    &lt;IfModule userdir_module&gt;
      &lt;IfModule !mpm_itk.c&gt;
        &lt;IfModule !ruid2_module&gt;
          UserDir enabled
        &lt;/IfModule&gt;
      &lt;/IfModule&gt;
    &lt;/IfModule&gt;
    # Enable backwards compatible Server Side Include expression parser for Apache versions &gt;= 2.4.
   # To selectively use the newer Apache 2.4 expression parser, disable SSILegacyExprParser in
   # the user's .htaccess file.  For more information, please read:
   #    http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilegacyexprparser
   &lt;IfModule include_module&gt;
     &lt;Directory "/home/abc/public_html"&gt;
       SSILegacyExprParser On
     &lt;/Directory&gt;
   &lt;/IfModule&gt;
  
   &lt;IfModule suphp_module&gt;
     suPHP_UserGroup abc abc
   &lt;/IfModule&gt;
   &lt;IfModule !mod_disable_suexec.c&gt;
     &lt;IfModule !mod_ruid2.c&gt;
       SuexecUserGroup abc abc
     &lt;/IfModule&gt;
   &lt;/IfModule&gt;
   &lt;IfModule ruid2_module&gt;
     RMode config
     RUidGid abc abc
   &lt;/IfModule&gt;
   &lt;IfModule mpm_itk.c&gt;
     # For more information on MPM ITK, please read:
     #   http://mpm-itk.sesse.net/
     AssignUserID abc abc
   &lt;/IfModule&gt;
  
   &lt;IfModule alias_module&gt;
     ScriptAlias /cgi-bin/ /home/abc/public_html/cgi-bin/
   &lt;/IfModule&gt;
   Include "/usr/local/apache/conf/userdata/std/2_4/abc/abc.com/*.conf"
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I tried to create a conf file in <code>/usr/local/apache/conf/userdata/std/2_4/abc/abc.com/</code> to change the document root to <code>.../public_html/public</code> then run <code>/scripts/ensure_vhost_includes --all-users</code> to rebuild httpd.conf and restart Apache. However, I don't think it's taking effect because files in <code>public_html</code> are still accessable by the world.</p>
  
  <p>What's the correct way to customize settings for the host?</p>