For this u have to edit /etc/http/conf/httpd.conf
Then here is eg how to do it
a. enable name virtual hosting on the ip
NameVirtualHost 192.100.0.X
b. First site: stationx.example.com
<VirtualHost stationx.example.com >
ServerName stationx.example.com
DocumentRoot /var/www/abc/
DirectoryIndex index.html
ServerAdmin root@ stationx.example.com
ErrorLog logs/error_abc.logs
CustomLog logs/custom_abc.logs common
</VirtualHost>
c. Second site: wwwx.example.com
<VirtualHost wwwx.example.com>
ServerName wwwx.example.com
DocumentRoot /var/www/example/
DirectoryIndex index.html
ServerAdmin
root@stationx.example.com
ErrorLog logs/error_example.logs
CustomLog logs/custom_example.logs common
</VirtualHost>
2. service httpd start| restart
3. chkconfig httpd on
4. links wwwx.example.com
6. links stationx.example.com
For Name based Virtual Hosting, we should specified the IP address on which we
are going to host the multiple sites using NameVirtualHost options.
• ServerName means you FQDN, already lookup on DNS
• DirectoryRoot path for web documents for this site.
• DirectoryIndex default page for websites.