Update to the latest Ubuntu.
Install rvm
Installing modules.
Using Puppetforge nginx and php installer.