Virtual Hosts on Apache

# vi /etc/hosts Add following lines: 127.0.0.1 http://www.address.com 127.0.0.1 http://www.smallco.com :wq # vi /etc/httpd/conf/httpd.conf :/NameVirtualHost Add following lines: # http://www.address.com NameVirtualHost localhost <VirtualHost localhost> ServerAdmin webmaster@www.address.com DocumentRoot /home/httpd/address/html ServerName http://www.address.com ErrorLogs logs/error_log CustomLog logs/access_log common </VirtualHost> # http://www.smallco.com NameVirtualHost localhost <VirtualHost localhost> ServerAdmin webmaster@www.smallco.com DocumentRoot /home/httpd/smallco/html ServerName http://www.smallco.com ErrorLogs logs/error_log CustomLog logs/access_log common </VirtualHost> : … Continue reading Virtual Hosts on Apache