Apache2

Setting up Drupal sites on Fink AMP with virtual hosts

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

setting up AMP (Apache2, MySQL5, PHP5) on OSX 10.5 Leopard with Fink

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