Converting a Mini to a Server, Part 5: Virtual Hosts

Now that I’ve got one site working on the Mini, it’s time to set up the other two. Naturally this requires virtual hosts. Since I’m not ready to switch off the current production server yet, I added a few more host names I can use until I am: minicafe.elharo.com for cafe.elharo.com, xom.elharo.com for www.xom.nu, and blog.elharo.com for www.elharo.com. (These are only accessible from inside my internal subnet so don’t try to connect to them.)

Next I copied over the virtual host configurations from the production httpd.conf file and restarted the server. It didn’t work. I still only saw one host. Duh. The old configs used the production names (cafe.elharo.com, www.xom.nu, and www.elharo.com) which weren’t yet mapped to the Mini. I edited the conf file to point to the temporary domains, restarted, and it all worked. Yay!

Hmm, well not quite. The Cafes gave an error message. It seems I needed to specify

DirectoryIndex index.html index.php

in its virtual host config. I’ m not sure why I didn’t need to do that on the old server. maybve there was a system wide config I didn’t copy over? Anyway it’s done now and it’s time to install WordPress and copy over the database.

As a bonus xom.nu will soon redirect to www.xom.nu instead of cafe.elharo.com, which had been confusing some people. On the minus side, elharo.com will now redirect to www.xom.nu instead of www.elharo.com. I’ll have to figure out how to fix that.

One Response to “Converting a Mini to a Server, Part 5: Virtual Hosts”

  1. Mokka mit Schlag » Most Popular Stories Says:

    […] Converting a Mini to a Server, Part 5: Virtual Hosts […]

Leave a Reply