Sunday, December 24, 2006

Setting up name-based virtual host on apache

I just finished setting up name-based virtual host for one of my clients. The server is Red Hat Linux Enterprise 4 update 4 (RHEL) with public IP. After I have successfully setting up DNS server correctly in particular to access to this server, this is how I setup name-based virtual host for it.

What is name-based virtual host?
A feature for webserver (ie apache,IIS etc) to serve many websites with one IP. The server will serve webpages accordingly based on the name of the site (ie , , etc2).

Let's do it.
This tip is for Red Hat and maybe the same for Fedora Core (FC). On Mandriva and other distros, the directive to change may be in different files and different folders.

Step 1
Open up /etc/httpd/conf/httpd.conf with your favorite text editor (I personally use joe in console).

Step 2
Coment out this line:

NameVirtualHost *:80

Step 3
Comment out these lines (in the VirtualHost containers and change accordingly to your server name:

DocumentRoot /var/www/html/
ErrorLog /var/log/
CustomLog /var/log/ common

DocumentRoot /var/www/html/email
ErrorLog /var/log/
CustomLog /var/log/ common

See the DocumentRoot directive in each VirtualHost container. It is different. And also see the difference of ServerName directive. It is used by Apache to differentiate the website served based on the name.

Step 4
Restart apache by issuing "service httpd restart" in console (without the double quote). Notice any error if any.

Step 5
Now you can try accessing your server with and See if it serves the right page. If yes, congratulations. You have successfully done it.

That's all there is to it. Have fun.

Wednesday, December 13, 2006

The new ShoutMix ShoutBox v2

At last the long awaited ShoutMix ShoutBox v2 is ready for prime time now and this time AJAX is used for real time update. It has many new features though. To know more, please register at shoutmix site and explore yourselve. For heavy or corporate users, you are encouraged to register as a premium user with affordable price and enjoy more features.

More news here and here.