title: 404 Not Found Error when trying to access localhost on local LAMP server
body: <p>I'm running Ubuntu. My Apache2 default file looks like this:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin webmaster@localhost
  
          DocumentRoot /var/www/
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
          &lt;Directory /var/www/&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
  
          ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
          &lt;Directory "/usr/lib/cgi-bin"&gt;
                  AllowOverride None
                  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                  Order allow,deny
                  Allow from all
          &lt;/Directory&gt;
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
  
          # Possible values include: debug, info, notice, warn, error, crit,
          # alert, emerg.
          LogLevel warn
  
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
      Alias /doc/ "/usr/share/doc/"
      &lt;Directory "/usr/share/doc/"&gt;
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order deny,allow
          Deny from all
          Allow from 127.0.0.0/255.0.0.0 ::1/128
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I have this file called Index.php in /var/www/</p>
  
  <pre><code>&lt;?
  phpinfo();
  ?&gt;
  </code></pre>
  
  <p>When I access <a href="http://localhost/" rel="nofollow">http://localhost/</a> in my browser, I'm getting the 404 Not Found error:</p>
  
  <p>The requested URL / was not found on this server.
  Apache/2.2.16 (Ubuntu) Server at localhost Port 80</p>
  
  <p>What am I doing wrong? This actually worked when I first setup LAMP but it's not working now.</p>