server stuff

At Code Positive, it is a standard practice to login to client's server via ssh and check out the code from Code+ server if their site is not hosted by Code+. Instead of uploading hundreds of damn files, it is a smart and efficient way of copying all the latest files to client's server.

Since I now have my own server and clients, I've been trying to set up this process myself. Here's my note (largely for myself) on how to do it.

Prerequisite:

  • You have your own *nix server / ability to add new users
  • You have access to your server via ssh
  • Your client has a *nix server and is accessible via ssh
  • Your client's web server has svn client installed

Needless to say, the reason for setting up AMP is to run Drupal on it. And setting up a virtual host is really useful.

Virtual host?

A virtual host (also referred to as vhost) allows you to access a resource (i.e. a website in this case) in arbitrary names. For example, if you have a Drupal site set up (let's call it 'site1') without a virtual host, they are most likely accessible from a web browser by the URL 'http://localhost/site1'. By setting up a virtual host, you can make the site accessible with pretty much any URL you like, for example 'http://site1.dev'.

Overview of the process:

  1. Edit apache's config file
  2. Create and edit a new virtual host config file
  3. Create a directory and settings.php for the site for Drupal
  4. Edit hosts file
  5. Reboot apache

My Dell XPS1330 with lovely Ubuntu decided to stop working. I hate Windows Vista and I needed a good wireframing and graphic tool so I had no choice but to buy a Mac. Since OSX is based on FreeBSD, I thought setting up AMP was a piece of cake. But I quickly found out it wasn't the case...
I tried setting up vitrual hosts with apache that comes with OSX, but I keep getting 'access denied' and can't set it up. Also the directory structure is quite different from the one I'm used to. I was going 'where is "sites-available" and "sites-enabled"?' and stuff.

I was advised by my friend Chris to try out MacPorts, and it is also James Walker's choice of package management tool. While James' observation is correct and MacPorts seems to be better at keeping packages up-to-date, I ended up in settling it up with Fink because I'm more accustomed to Debian/Ubuntu.
Overview of the process:

  1. Disable OSX's apachectl
  2. Download, install and configure fink
  3. Install AMP
  4. Various tweaks to make the system work
Syndicate content