Wamp 本地配置域名
1:极简
<VirtualHost *:80>
DocumentRoot "D:\wamp\www\demo"
ServerName www.demo.com
</VirtualHost>
2:推荐常用
<VirtualHost *:80>
DocumentRoot d:\wamp\www\demo
ServerName www.demo.com
<Directory "d:\wamp\www\demo">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
3:需要更多配置用户
<VirtualHost *:80>
#配置站点管理员的邮箱,当站点报500错误的时候会在页面上提示错误信息,并且列出管理员邮箱
ServerAdmin 864904669@qq.com
DocumentRoot d:\wamp\www\xb\itcast
ServerName www.1006.com
#站点的别名
ServerAlias 1006.com
#错误日志的储存位置, logs目录在Apache目录下
ErrorLog "logs/1006-error.log"
#正常访问日志的存储过程,common是指日志的记录规则名称
CustomLog "logs/1006-access.log" common
<Directory "d:\wamp\www\xb\itcast">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>