修改httpd.conf 文件
ServerName 127.0.0.1 改成 ServerName 你的ip(112.11.1.111)
NameVirtualHost 112.11.1.111
<VirtualHost www.test.com>
ServerAdmin webmaster@test.com
DocumentRoot /var/www/html
ServerName www.test.com
</VirtualHost>
<VirtualHost www.website1.com>
ServerAdmin webmaster@website1.com
DocumentRoot /var/www/html/website1
ServerName www.website1.com
</VirtualHost>