# 一、更改www目录
1.按照下图所示打开httpd.conf
> DocumentRoot "F:/Code/PHP/Demo/"
> <Directory "F:/Code/PHP/Demo/">
# 二、更改虚拟目录即localhost
1.按照下图打开httpd-vhosts.conf
> #
#Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot F:/Code/PHP/Laravel1-master/public
<Directory "F:/Code/PHP/Laravel1-master/public">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
1.按照下图所示打开httpd.conf
> DocumentRoot "F:/Code/PHP/Demo/"
> <Directory "F:/Code/PHP/Demo/">
2
将双引号内的路径替换成自己的# 二、更改虚拟目录即localhost
1.按照下图打开httpd-vhosts.conf
3\![httpd-vhosts.conf](https://img-blog.csdn.net/20161203142539859)
3
2.修改红框中的路径> #
#Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot F:/Code/PHP/Laravel1-master/public
<Directory "F:/Code/PHP/Laravel1-master/public">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>