原文:http://dason.blog.51cto.com/658897/505312
Apache虚拟主机配置(多个域名访问多个目录)
<VirtualHost 192.168.1.1:80> ServerAdmin dason@sina.com (你的邮箱) DocumentRoot /usr/local/apache2/htdocs/Joomla(此虚拟主机的根目录) ServerName www.abc.com(此处为域名) ErrorLog /usr/local/apache2/htdocs/abc/error_log (日志) TransferLog /usr/local/apache2/htdocs/abc/access_log (日志)</VirtualHost><VirtualHost 192.168.1.1:80> ServerAdmin dason@sina.com (你的邮箱) DocumentRoot /usr/local/apache2/htdocs/bbs (此虚拟主机的根目录) ServerName www.bbs.com (此处为域名) ErrorLog /usr/local/apache2/htdocs/bbs/error_log (日志) TransferLog /usr/local/apache2/htdocs/bbs/access_log (日志)</VirtualHost>