Nik's Technology Blog

Travels through programming, networks, and computers

Apache Web Development Testing Server Set-up

I've been setting up an Ubuntu linux machine for web development testing on my local network, but because the machine has only one IP address assigned to it I wanted a solution to be able to serve more than one website without changing the config in Apache each time.

One method would be to use a separate folder for each site but .htaccess rewrites don't work properly using this method and if you write hyperlinks that refer to the root of the site (i.e /contact.php), this can cause issues too.

Anyway, I thought of using different port numbers to distinguish the different testing websites. So one site maybe on, another on etc...

You set this up in Ubuntu as follows:

Open a Terminal prompt and type:

sudo gedit /etc/apache2/ports.conf

Enter your password and then for each port number you require add a Listen statement on a new line. So your file should look like:

Listen 80
Listen 2000
Listen 2001

Listen 443

Save the file and then go back to the Terminal and type:

sudo gedit /etc/apache2/sites-available/default

In this file you should find a <virtualhost *> tag followed by various commands. You need to copy and paste everything from <virtualhost *> to </virtualhost> onto a new line below.
Then rename the first <virtualhost *> to <virtualhost> where is the IP address of you machine. Rename the second virtual host to <virtualhost> and repeat for as many websites you want to set-up.

Then for each Virtual Host you'll need to change the DocumentRoot to the file path to each website on the local machine.

Once this is done you'll need to restart Apache to see if your changes have been successful. To do this type the following into the Terminal:

sudo /etc/init.d/apache2 restart

Novell Suse Linux 9.2 Pro Supports Bluetooth and WLAN

I saw an advert in PC Pro claiming that the new Novell Suse Linux, version 9.2 Professional has improved support for mobile devices.

If you've read my previous post concerning Linux and WLAN you'll probably have guessed my reaction to this news.

I checked out, which is in the process of being moved to the Novell site, and read the product description with baited breath.

It seems that YaST (Suse's installer of choice) has been updated to include better support for WLAN, Bluetooth and IrDA.

It reads...

Improved WLAN support and configuration with YaST (including Centrino).

New YaST configuration modules for IrDA and Bluetooth.

Bluetooth support with autodetection for synchronization with Bluetooth cell phones and handhelds.

It's all very exciting stuff and for around 56 GBP it's competitively priced considering it comes bundled with over 1000 open-source software products.

Wireless and Linux

While I'm on the subject of wireless networks (WLAN) I'm still waiting for Linux to catch up and support more Wi-Fi devices so I can start to use my Linux box to the full. As yet I'm still unable to get Mandrake or Red Hat to work with my MA111 out of the box or using linux-wlan.

If anyone knows of any PCI or USB solutions that are compatible and available in the UK please contact me via my contact page.