vim /usr/local/apache2.4/conf/httpd.conf
# 去掉注释
#Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-vhosts.conf
vim /usr/local/apache2.4/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/data/www/abc.com"
ServerName abc.com
ServerAlias www.abc.com www.123.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
/usr/local/apache2/bin/apachectl –t
# 检查配置文件
/usr/local/apache2/bin/apachectl graceful
# 重新加载配置文件
$ curl -x192.168.127.128:80 www.abc.com
Hello World