<VirtualHost *:80>
#DocumentRoot "D:\phpStudy\WWW\123"
DocumentRoot "D:\phpStudy\WWW\123"
ServerName www.123.com
ServerAlias
<Directory "D:\phpStudy\WWW\123">
Options FollowSymLinks ExecCGI
#是否显示列表 (在发布项目后一般是不启用,对于这个配置,针对DocumentRoot在apachede的默认文件夹外的目录生效 )
Options +indexes
AllowOverride All
Order allow,deny
Allow from all
#Deny from all
Require all granted
</Directory>
</VirtualHost>
然后在hosts文件中添加
127.0.0.1 www.123.com
就ok