I ordered a VPS today, and am about to upload my website. It uses java, mysql, php etc...
However, I need to password protect the site at first...
I use Ubuntu 9.10 and have installed LAMP just now.
How can I easiest do this?
You'll find the Apache documentation for authentication here.
It's the only way to password protect it. If you simply want to restrict access while you set it up then it's probably also the most convenient method of restricting access.
I'm a bit paranoid but I'd personally firewall off everything but SSH (running on a non-standard, high port) and use a tunnel to access the site over SSH.
All traffic between me and the server is encrypted and you can only access the webserver over the tunnel.
Tunnelling from a unix machine (with a proper ssh binary): http://www.revsys.com/writings/quicktips/ssh-tunnel.html
From Windows with Putty: http://oldsite.precedence.co.uk/nc/putty.html