title: Xampp - Apache Shuts Down Unexpectedly, Empty Log File And No Events
body: <p>I have XAMPP installed on my machine. I am trying to run Apache from the XAMPP Control Panel.</p>
  
  <p>I start the XAMPP Control Panel by right-clicking the shortcut and selecting "Run as administrator" (I am logged in on an account with Administrator privileges). The Control Panel starts up and everything appears to be in order (no error messages/warnings).</p>
  
  <p><img src="https://i.stack.imgur.com/6cdKD.png" alt="Xampp Control Panel After Startup"></p>
  
  <p>When I click the <em>Start</em> button next to Apache I get the following error message:</p>
  
  <pre><code>2:22:44 PM  [Apache]    Attempting to start Apache app...
  2:22:45 PM  [Apache]    Status change detected: running
  2:22:45 PM  [Apache]    Status change detected: stopped
  2:22:45 PM  [Apache]    Error: Apache shutdown unexpectedly.
  2:22:45 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
  2:22:45 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
  2:22:45 PM  [Apache]    Check the "/xampp/apache/logs/error.log" file
  2:22:45 PM  [Apache]    and the Windows Event Viewer for more clues
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xZvSR.png" alt="Xampp Control Panel Apache Error"></p>
  
  <p>Note that it's telling me Apache has shutdown unexpectedly and to check the error.log file and the Windows Event Viewer.</p>
  
  <p>I checked the error.log file but it's empty:</p>
  
  <p><img src="https://i.stack.imgur.com/GB4hq.png" alt="Apache Error Log File Empty"></p>
  
  <p>I also checked for any events using Windows Event Viewer but the event viewer shows no events (under Application):</p>
  
  <p><img src="https://i.stack.imgur.com/ug2ED.png" alt="Windows Event Viewer No Application Events"></p>
  
  <p>I have checked for programs that might be blocking ports, etc. (like Skype, Visual SVN Server) and closed any programs that might be causing the issue.</p>
  
  <p>Is there anything else I can do to find out what might be going on? </p>
  
  <p>Thank you.</p>
  
  <p><strong><em>UPDATE</em></strong></p>
  
  <p>I figured out the problem by trying to run apache from a DOS command prompt. Running from the command prompt gave me the specific errors and the location in the httpd.conf file where those errors were. It turns out that my <em>ServerRoot</em> and <em>DocumentRoot</em> values were incorrect (pointing to wrong directories). I changed them to point to the correct directories and now I can start apache from the Control Panel.</p>
  
  <p>Curious, why didn't I see the error messages about <em>ServerRoot</em> and <em>DocumentRoot</em> when launching from the Control Panel? </p>