一、cd /etc/apache2/sites-enabled
在该目录下新建一个文件:
文件内容类似:
ServerName a.test.com
DocumentRoot /home/web/test-com
Options All
AllowOverride All
Order allow,deny
allow from all
二、重启apahce2:
/ettc/init.d/apache2 restart
注:a.test.com为你的网站域名, /home/web/test-com为域名对应目录