title: How to setup private folders for PHP includes files for local testing AND live use.
body: <p>Bit of a noob here. There is a probably a simple solution here - but I can’t get it to work or create a non-kludgey environment for testing.  This may be answered in part elsewhere, but I'm still pulling hair out - so I'm going to ask.   </p>
  
  <p>The live path on a Linux VPS (with many sites in vhosts directory):</p>
  
  <pre><code>/var/www/vhosts/mysite.com/subdomains/mysubDomain/httpdocs/index.php /* the public, everyone can see web root directory */  
  </code></pre>
  
  <p>I want to be able to configure a private level includes file folder:</p>
  
  <pre><code>/var/www/vhosts/mysite.com/subdomains/mySubdomain/includes/myincludes.php  /*where I want the webserver only to read */  
  </code></pre>
  
  <p>Note:  I’d also like to use a same-level directory for moving private files after upload.  </p>
  
  <p>Locally, I’ve tried to create a similar structure at:</p>
  
  <pre><code>C:\xampp\htdocs\mySubdomain\httpdocs  
  </code></pre>
  
  <p>One bad ideas is to set DocumentRoot in a local vHosts file to the mySubdomain folder – but that exposes the directory structure in things like:</p>
  
  <pre><code>&lt;img src=”/httpdocs/images/image.png"&gt;  
  </code></pre>
  
  <p>– and will not be acceptable in the live site.</p>
  
  <p>On my XAMPP testing server, I’ve set up the vhosts file, for mysite.local to create the following</p>
  
  <pre><code>NameVirtualHost 127.0.0.1:80
  &lt;VirtualHost 127.0.0.1:80&gt;
       DocumentRoot C:/xampp/htdocs/
      ServerName localhost
  &lt;/VirtualHost&gt;
  &lt;VirtualHost mysite.local&gt;
      DocumentRoot "C:/xampp/htdocs/mySubDomain/httpdocs"
       ServerName mysite.local
       &lt;Directory "C:/xampp/htdocs/mysite" &gt;&lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>But, then I can't access my includes in the the mySubdomain folder.  </p>
  
  <p>Questions:  </p>
  
  <ol>
  <li>Is this whole approach provide any real benefit over htaccess in ‘live’ level folders (ie httpdocs/includes)?  I’ve seen multiple references that storage “below public” will be a more secure file and preferred folder structure. </li>
  <li>Is it  includepath and the  Document Root settings?  Some other magic and delicate balance of settings?  How does one create local testing access where the httpdocs(not the htdocs local folder is identified as the public directory? </li>
  <li>Bonus (and the noob giveaway), if it’s possible to setup DreamweaverCS5.5 in this config  for leveraging some of it’s fine features(like auto-discovery of the includes file) for testing and browser checking.</li>
  </ol>