php 配置虚拟主机
apache/conf/extra/httpd-vhosts.conf
1 <VirtualHost *:80> 2 ServerAdmin webmaster@dummy-host2.example.com 3 DocumentRoot "D:\project\php" 4 ServerName www.yllyang.com 5 ServerAlias localhost 6 ErrorLog "logs/dummy-host2.example.com-error.log" 7 CustomLog "logs/dummy-host2.example.com-access.log" common 8 <Directory "D:\project\php"> 9 Options FollowSymLinks 10 AllowOverride None 11 Order allow,deny 12 Allow from all 13 </Directory> 14 </VirtualHost>
host中设置访问目录
127.0.0.1 www.yllyang.com