Is there a way to put the terminal on the web browser instead, so I just fire up localhost:80 and then I'll have a terminal on it that I can use and whatever I execute it will execute on my local web server?
And the outputs I want to be displayed on the web browser too, just like a normal Terminal.
I'm using Ruby on Mac OS X/Ubuntu.
You can use shellinabox, here are deb packages.
There are several packages which allow you to log into a computer using ssh via a web browser, including anyterm and AjaxTerm. See here.