create respective directores in /var/www/html ( or where ever you want, one for each host )
make sure all the domain names resolve to your IP i.e nslookup on all your domains gives you your IP ( same IP, since you have only one )
and add this at the end of your httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@abc.com
DocumentRoot /www/html/abc/
ServerName abc.com
ErrorLog logs/abc.com-error_log
CustomLog logs/abc.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@xyz.com
DocumentRoot /www/html/xyz/
ServerName xyz.com
ErrorLog logs/xyz.com-error_log
CustomLog logs/xyz.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@abc.com
DocumentRoot /www/html/efg/
ServerName efg.com
ErrorLog logs/efg.com-error_log
CustomLog logs/efg.com-access_log common
</VirtualHost>
restart apache.
HTH
PS: I have assumed that your domain names are resolved to your IP, In that case you dont need to do anything to your DNS configuration


Reply With Quote
Bookmarks