title: How do I test a website using XAMPP?
body: <p>This is a fairly general query as I'm very confused about how to do this. I want to use the apache server which I have downloaded as part of XAMPP in order to test the website I am building, which will use php and mysql. The general question is: how do I do this?</p>
  
  <p>As far as I understand it, the files go into C:\xampp\htdocs, which can then be accessed via localhost. What confuses me though is that the XAMPP admin stuff is also located here - so, for instance, I can't replace the file index.php without losing access to phpMyAdmin and so on. Do I have to create a new folder for the website within this?</p>
  
  <p>I tried setting up a virtual host using instructions I found online. I added it to the windows host file and to the xampp hosts config file as directed <a href="http://sawmac.com/xampp/virtualhosts/" rel="noreferrer">here</a>, for instance. Having done this the Apache service would not start and gave me an error log very similar to <a href="https://stackoverflow.com/questions/16644064/xampp-session-cache-is-not-configured-hint-sslsessioncache">this one</a>. I followed the instructions given in the answer to that, and it still did not work. I have since removed and reinstalled it and it is working ok again, but without the virtual hosts set up.</p>
  
  <p>Finally, I want to use HTMLPad to build the website because I really like its real time preview feature. However, to set this up, it again needs to be connected with the server. The instructions it gives are:</p>
  
  <blockquote>
    <p>In-depth Tutorial: How do I preview PHP files?</p>
    
    <p>To be able to preview PHP files locally without uploading to web, you
    need to have a web server installed on your computer and it must be
    configured to support PHP files. Please refer to PHP and web server
    manuals for more info on installing web server with PHP support.</p>
    
    <p>We recommend to use the free Apache web server from apache.org</p>
    
    <p>Step 1 - What is your document root? Find out what is your local web
    server document root folder. The document root folder stores web page
    files available via your web server URL. Please refer to your web
    server manual for more info.</p>
    
    <p>Step 2 - What is your web server address? Find out what is your local
    web server URL, usually it is <code>http://localhost/</code></p>
    
    <p>Step 3 - Make sure your web server works Verify that your web server
    really works with PHP files. To do this, save a PHP file to your web
    document root and try to open it via web browser. For example, if your
    web document root is c:\htdocs\, save your file as c:\htdocs\index.php
    and try to open it via URL <code>http://localhost/index.php</code></p>
    
    <p>If your web server works, you are now ready to configure internal
    preview.</p>
    
    <p>Step 4 – Configure internal preview Now you must tell the editor
    software how to use your web server to display the PHP file preview.</p>
    
    <p>On the Options menu, click Preferences; In Preferences window, click
    Preview folder; Click Mappings, then click Add; Enter your document
    root folder and the corresponding web address, in the above example
    you would enter c:\htdocs\ and <code>http://localhost/</code></p>
  </blockquote>
  
  <p>Again, in the context of all the above, I'm not quite sure I understand this. Presumably this links to all the php, mysql etc files within the original htdocs folder? But does it matter where the files I'm working on are saved, for example?</p>
  
  <p>Basically, I'm just a bit confused, and any help would be very much appreciated!</p>