May 2007


du command give you an overview of your file-directory space usage. It tell you about the space occupied by certain directory/file which may be causing overload on your server resulting in system crash or preventing users from logging-in, so for a system administrator this command is very helpful to monitor disk usage for avoiding system crashes.

You can use du –sh * to know which file/directory is eating up your disk space so as to take precaution;

Simply start with du -sh * look for the biggest directory, cd into it and once again fire the command. Repeat the process until you find the particular file.

You can also use du –sk * | sort –n for getting sorted outputted with biggest files/directory at the bottom.

User having read permission on certain directories can only fire this command for those specific files and directories thus, an ordinary user would generally not be able to use du command to determine disk space consumption for files or directories belonging to other users.

Apache http server allows a facility to run Virtual Host. Using virtual host you can host several different web sites simultaneously using separate DNS but from same server. Visitors for your site will not be able to distinguish whether your site is hosted on shared IP or on dedicated IP. Generally virtual host do not have unique IP address.

There are 2 types of virtual host
*) IP based : IP based virtual hosting allows you to host more than one website on same server with their own IP address. Here you need to have separate IP address for each host.
You can have as many host as you have IP addresses (nearly 254). SSL can be used under this type of hosting.

*) non-IP/name based : In name-based virtual hosting same IP address is used for different names. Here server relies on clients for hostname. Using this technique, many different host can share same IP address. You can host unlimited site under this hosting.
Configuring name based virtual is easy, you just have to configure your DNS server so as to map each hostname to correct IP address and then configure the Apache HTTP Server to recognize the different hostnames.
You cannot use Named-based hosting with SSL secure servers due to restriction of SSL protocol.