There is nothing like configuring your own server to start getting a real understanding of how the guts of LAMP works. I’ve configured a lot of servers, but never built an entire Apache server from scratch before. Rackspace offers a cloud server for as little as $10 a month.
One of the first things you’ll want to do is create a server instance. I chose Ubuntu Maverick Meerkat (somewhat reflexively) as a server image. Rackspace builds the image and sends you an email when it’s done. You’ll use those credentials to login…but what next?
I would start giving instructions, but the truth is that I learned the most by
tracking down the instructions myself. So, I’ll instead give a list of the things you’ll need to do.
- Install and configure SSH. Alter the standard port from 22 to something else so you don’t get hit by bots.
- Add a user with a home directory.
- Add that user to sudoers.
- Log out from the Rackspace console.
- Use either a bash shell from a NIX box or download Putty for use from a Windows machine.
- Krusader or Dolphin will work fine for file transport from NIX; download WinSCP for SFTP (secure file transfer protocol).
- Login using your shell and your new user. Use nano as a text editor for your work; it’s simplest. Install LAMP, Open SSL, and any other packages you want…but LAMP will do it. Use Tasksel–it’s the simplest way to install the full server.
- Use one of your spare domain names or a subdomain (blank.yourdomain.com), and point it to the IP address of your shiny new server.
your Apache Virtual Hosts (use sites-available and sites-enabled) to catch the incoming requests. That means to point requests for blank.yourdomain.com to a directory on your server, typically /var/www, but you can choose any. I’ve got sites in my home directory under individual names.
- Transfer files for any site using your SFTP or SCP protocols.
- Try hitting the site.
It’s rather simple, but it will take a while to configure. It’s fun to learn, but will be complicated, and is best treated as a hobby until you’ve got the security down. I’m also happy to answer questions.