title: Apache throwing 404 for a file in var/www folder
body: <p>I have the following php file (try.php) inside my <code>/var/www folder</code>. I am operating a mac.</p>
  
  <pre><code>$html = "testing print";
  $handle = printer_open();
  printer_set_option($handle, PRINTER_MODE, "RAW");
  printer_write($handle, $html);
  printer_close($handle);
  </code></pre>
  
  <p>I have apache and php installed . If I execute the command.</p>
  
  <pre><code>apachectl -version
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>Server version: Apache/2.2.26 (Unix)
  Server built:   Dec 10 2013 22:09:38 
  </code></pre>
  
  <p>Similarly executing for php version I get</p>
  
  <pre><code>PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29) 
  Copyright (c) 1997-2014 The PHP Group
  Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies       
  </code></pre>
  
  <p>I restart my server with the following command. </p>
  
  <pre><code>sudo apachectl restart
  </code></pre>
  
  <p>The command returns on the console without printing anything. After that I hit the url.</p>
  
  <pre><code>http://localhost/try.php
  </code></pre>
  
  <p>This gives me a 404 error.</p>
  
  <blockquote>
    <p>The requested URL /try.php was not found on this server.</p>
  </blockquote>
  
  <p>I have also given read, write and execute permissions to the <code>/var/www</code> folder.</p>
  
  <p>Any ideas what I get this error.</p>
  
  <p>The document root configuration in http.conf file is as follows.</p>
  
  <pre><code>&lt;Directory /&gt;
  #Options FollowSymLinks
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Order deny,allow
  Allow from all
  &lt;/Directory&gt;
  </code></pre>