title: Apache: Can't open .php files
body: <p>I want to start learning PHP, so I installed Apache2, MySQL and PHP5 on my Ubuntu 10.10 today. For some reason, when I try to open a file other than index.html from the default directory /var/www/, I either get a 404 error or I get a prompt to download the php file. I googl'd all over and I can't find a solution.</p>
  
  <p>When I do <a href="http://localhost/index.html" rel="nofollow">http://localhost/index.html</a>, it works, and displays whatever I write in index.html. When I change /index.html to /test.php, I get an error saying "The requested URL /test.php was not found on this server".</p>
  
  <p>When I try /var/www/index.html or file:///var/www/index.html, again, index.html appears although it appears differently. When opened with <a href="http://localhost/index.html" rel="nofollow">http://localhost/index.html</a> I only get "It works!", but with /var/www/index.html I get "It works! 
  This is the default web page for this server.</p>
  
  <p>The web server software is running but no content has been added, yet."</p>
  
  <p>And then when I change /var/www/index.html to /test.php, I get a prompt to download test.php.</p>
  
  <p>In my .conf files, the default directory is set to /var/www/, so this is very weird.</p>
  
  <p>Edit:</p>
  
  <p>Did some checking, and it seems that when I run <a href="http://localhost" rel="nofollow">http://localhost</a> it's set to a directory in the httpd directory. I tried putting my test.php file there, and still I'm getting 404. But when I write the full path, again, I get a download prompt.</p>
  
  <p>This problem is really confusing... thanks to all helpers.</p>