Apache VirtualHosts

The following tutorial will explain how to configure one Apache server to resolve for multiple domain names. We assume you already have install Apache on you Linux based server. Check your distribution for where the configuration files are stored. For this example I am using Ubuntu 12.04.1 LTS.

Make sure you have the DNS A records pointing to the external IP of your server.
We will setup the following domains:

  • example1.com
  • example2.ca

First step is to create separate directory’s for each website. Apaches default web folder is /var/www so we will make the folders in there.

cd /var/www
mkdir example1.com
mkdir example2.ca

Now that the directory’s are made you can upload the sites into each of them.

Next step is to make some configuration files for each of the websites. For that we are going to switch to the /etc/apache2/sites-enabled and create a new file. You can use another text editor if you wish.

cd /etc/apache2/sites-enabled
nano example1.com

Inside this file, you will want to insert the following config.

<VirtualHost *:80>
        ServerAdmin webmaster@example1.com
        ServerName example1.com
        ServerAlias www.example1.com

        DocumentRoot /var/www/example1.com

        <Directory /var/www/example1.com>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/example1.com-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/example1.com-access_log.log common

</VirtualHost>

You could keep the logs in there default directory, but I like to know if one site has an issue that others are not. In this configuration we have not included CGI for security reasons.

The next configuration file is simple. Just need to replace example1.com with example2.ca.

<VirtualHost *:80>
        ServerAdmin webmaster@example2.ca
        ServerName example2.ca
        ServerAlias www.example2.ca

        DocumentRoot /var/www/example2.ca

        <Directory /var/www/example2.ca>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/example2.ca-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/example2.ca-access_log.log common

</VirtualHost>

After you have created all your configs, it’s time to restart Apache.

sudo service apache2 reload

That is it. You have now configured multiple domains on Apache.

IIS7: What a change

In the next few weeks, I am required to use one of my most scariest server products I have used. IIS. I use to manage a small network that used IIS for hosting internal mail interface and other web based products our company used. Back then, we were running IIS6 on Server 2003 R2, and what a scary machine that was. IIS6 wasn’t very intuitive compared to other Microsoft server products at that time. When you needed to add a site or add a CGI extension, it always felt you had to hack it to get something to work and you never went back to it after it was working.

I was required to install it for a programming class and what a change. For someone that never had proper training on IIS, the new interface has defiantly been improved and is now very intuitive.

To install IIS7 was open Control Panel -> Programs and Features -> “Turn Windows feature on or off”. I checked the “Internet Information Service” in the list and that was it. Windows installed the service without needing the disks.

It was that easy to get the new web server up and running on my local development machine.

IIS7 Main screen
Browsed to http://localhost to make sure my new IIS server was running.

I remember spending hours in the server room trying to get PHP installed on the old IIS6 machine we were running. I thought, I wonder how easy it will be on IIS7? Turns out very easy! Microsoft now has an installation you can download that installs PHP 5.3.13 into your IIS.

A few things need to be done first. Make sure you have installed CGI. Windows does not do this by default.

CGI Installation
Be sure “CGI” is checked.

IIS is now ready for the PHP installation. Go to php.iis.net to download the executable. Once you have it download, run it and follow the on screen instruction.

That is it! You have now installed PHP on your IIS server. Create a phpinfo() file on the root of your web-server to make sure everything is working.

My phpinfo().

If you run into the error “Handler “PHP53_via_FastCGI” has a bad module “FastCgiModule” in its module list” it means CGI is not installed. Go back into Windows Features and check “CGI”.

Alesis MultiMix Hum

The following information addresses how to repair a power supply issue with the Alesis MultiMix. I first noticed the problem about a 7 months ago.

Symptoms are as follows:

  • Clip & Sig LED are on solid (FX section)
  • XLR Inputs hum
FX Section
Here are the LED’s lit up. If you try using the FX section, it hums.

The XLR input hum is the worst problem in my case. So after some Googling and reading, problem is that 2 of the power supply capacitors are blown. To change the capacitors is fairly simple. First thing is to remove the screws on the bottom and the back of the mixer as shown below.

Rear Screws
Remove all the screws on the bottom of the mixer
Three rear screws on the mixer.

Now that the rear plate is loose, disconnect the black 8 pin connector to the power supply, then disconnect the 2 pin SPDIF connection to the main bored on the right.

Disconnect the black 8 pin connector.
Disconnect the 2 pin SPDIF connector.

There should be enough room to get a fillips screw driver in there and remove the power supply bored. But first the connecting wires need to be disconnected.

From left to right:

  • Power Connector
  • Power on/off switch
  • Phantom Power switch
  • Main power to the the mixer
Next step is to remove the 4 screws from the power supply bored. You will need to pry off the components from the heat sink.
Right capacitor has the bottom blown right out of it & the left one is leaking at the top.

As many posts online have said, both capacitors are going to need changing at the same time. Here are the specs of the capacitors. Voltage doesn’t matter to much.

Right Capacitor – 1000uf @ 35V

Left Capacitor – 2200uf @ 35V

My local electronics shop had the right capacitor in stock but I had to use a 50V cap on the left one. It was a little bit bigger so my new cap sits a little sideways on the bored.

New capacitors are installed. You can see the left cap had to be a little to the left so the top part of the mixer would clear.

That is it. You have now successfully change the 2 capacitors causing the hum in your mixer. Follow these steps backwards to put your mixer back together.  Be sure to evenly apply pressure  to the heat sink. Also, when putting the base plate back in, be patient, it will slid in together easily.

Installing NetBeans on Xubuntu 10.04

Installing NetBeans is simple in Ubuntu, but Xubuntu doesn’t seem to have the package in its repositories. The following will guide you through the install.

First thing needed is Java. You can install the openJDK or the sunJDK.

For openJDK

sudo apt-get install openjdk-7-jdk

For Sun JDK

sudo apt-get install sun-java6-jdk

Next we need to download the NetBeans installer. Navigate to NetBeans.org and download the version you require.

After the download has completed run the following to begin the install.

sudo sh ./netbeans-x.sh

Replace x with the version you have downloaded.

And that is it! You now have NetBeans installed.

VirtualBox Guest Additions install Kubuntu 10.04

Install VirtualBox’s guest additions are relativly stright forward in Ubuntu. But for Kubuntu 10.04 it’s takes a little more work.

Open the terminal and execute the following commands. First, check to make sure the system is up to date.

sudo apt-get update
sudo apt-get upgrade

Restart the system after these have been installed. Next we need to install and get a few things.

sudo apt-get install dkms
sudo apt-get install build-essential

Restart the system again.
Now we can install the guest additions. Devices -> Install Guest Additions… Virtual CD should mount automatically.

cd /media/VBoxLinuxAdditions_x
sudo ./VBoxLinuxAdditions.run

Install might take a little while to compile. After it has completed, restart the system. Guest additions have now been successfully installed.