I recently purchased a small OpenVZ VPS (Virtual Private Server) for $15/year. It has 128MB RAM, 256MB vSwap, 20GB of disk space, and 500GB of bandwidth/month. The server is running Ubuntu 12.04 LTS and has very good transfer rates. Initially, I wanted to use it to host all of my Git repos, but then I realized that it was much easier to just use BitBucket. So, I starting thinking about how I could use this tiny server.
Today I was, once again, faced with a problem where a bash shell script was the best solution. Seeing that I spend most of my time writing php code, the shell script was a welcome break.
A few minutes into my coding of the shell script, I realized that I needed the WAN IP address of the server I was working on. My first thought was to write some sort of fancy shell interface into the router where I could query the information I needed and use it in my shell script, but that would have been a bit of overkill. So what I did was put a nice little php script at http://ip.keithscode.com that simply prints the remote IP address that is accessing the script. Now I can easily get the IP using the following line in my script:IP=`wget -q -O - http://ip.keithscode.com`
I thought this bit of information my be helpful to someone, so I decided to put a quick note about it here. I've included examples and a bit more explanation after the break.
This tutorial will describe how to install Subversion with SSL web access onto a home server. Subversion is a great way to keep track of a number of projects and have widespread access to all of your files. It doesn't matter if you are the only person that will be accessing the repository and don't need all of the version control features, it is still a great way to keep an eye on your projects and make sure you have your information wherever and whenever you need it.
This tutorial uses Ubuntu Server 8.04 with Apache2, OpenSSL, and WebDAV. It assumes that you have a properly setup server including Apache and OpenSSL, at least a little Linux knowledge, and access to the Linux command prompt with sudo access. This tutorial is geared toward the home Linux server and assumes that your ISP blocks all incoming ports below 1024.
9/1/2011 Update: This tutorial has also been tested on Ubuntu 10.04LTS and works without issue.