web control question

Hi, could someone please shed some light on how to do this? I am confused.
What I want to do is, send and receive information from a webpage hosted on a VPS to an arduino at home. (control from work for example) but also see its inputs
What do I need to run on the VPS to serve up the page and make it work?
Is there a simple step by step approach?
I have tried some other libraries, like teleduino, and it works perfectly. I want to expand on this idea, and add things to it, but I dont know how to get the server side working. Just a webpage with aheap of buttons that controls it remotely.
Theere seems to be multiple ways to do this? and yet I dont get any of them haha

What do I need to run on the VPS to serve up the page and make it work?

Nothing. All you need is an Ethernet shield on the Arduino, and make it be the server.

Thanks for the reply PaulS.
I might be misunderstanding still. I do not want the Arduino to be the server. I want the server to be the server and the arduino to connect to the server static IP. From there, I log into the server via web and click instructions etc. So not much is hosted on the arduino except ethernet library and some pin configs.

The reason is, I dont have a static ip, so i think its easier to get the arduino to talk to the server from whatever ip it is on?
So what I am looking for is some advice/instruction on how to setup a virtual server, (database? of some sort), and have the arduino just connect and then wait, or respond to a query like "how much memory is free" and then allow me to set a pin high. Then it just waits until the server wants it again.
Thanks for the help guys, this stuff is hard but awesome. I just need to stop my neurons from oscillating so hard.

As you say, there are multiple ways to do it, some harder than others, some more resilient than others.

You have two fundamental problems to solve.
Sending the status of the arduino to the server, which is not too difficult.
Having the arduino respond to commands sent from the server, which is a bit more difficult.

In between these two fundamental problems are a bunch of unknowns.
Are you comfortable programming Linux.
Are you familiar with HTTP, PHP, SQL
Can you fit a database client into the arduino's memory.
Will your host allow any old protocol through their firewall.
Will your router allow UDP return traffic.
How fast and how frequently do you need the arduino to update
What happens when the arduino is offline
For instance.

Taking the unknowns into consideration, I guess I would attack the problems as follows.
Sending status:
Create a database on the server (sqlite or mySQL will do) to hold the current status of the arduino.
Have the arduino post it's status to a URL on the server, using a simple HTTP 1.0 message.
Create a php script to receive the status and update the database on the server
Create a php script to query the database and send a page of HTML to the client browser.

Receiving messages:
Almost the reverse of sending status.
Create a php script which sends an HTML form to the client, containing the command interface.
The client posts the command on the URL and another php updates a table in the database, containing a queue of command blocks.
The arduino periodically sends an HTTP 1.0 GET request, which causes a PHP script to return the number of commands waiting in the queue.
If there are commands waiting, the arduino sends another get request, to retrieve the next command.
The arduino sends a further get request, acknowledging the command has been completed and a php script removes the command from the queue.
So on and so forth until there are no commands waiting.

That would meet the solution requirements, with the learning curve reduced to HTTP, PHP and SQL.
It won't be very fast though.,