If you have not yet read the article on how to get a LAMP stack on your Ubuntu server go read that first to get everything installed.
This article will test to see if everything is working great.
Now that you have set up your Apache virtual host to point to the new site we will go over how to test if everything now works.
First go to your web directory.
Then make the newsite directory.
sudo mkdir newsite
Now we need just an index.php page in their.
sudo vim index.php
Now that you have the index page created lets write some PHP.
This will call the phpinfo function which will output to the browser everything about the PHP installation. If you get an error or a blank page you did something wrong along the way.