1、配置一个域名
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 www.lenovo.com
2、修改Apache配置
打开apache服务器的 httpd-vhosts.conf 文件,添加配置信息:
<VirtualHost *:80>
ServerName www.lenovo.com
ServerAlias localhost
DocumentRoot "F:\PHP\www\laravel_lenovo\public"
<Directory "F:\PHP\www\laravel_lenovo\public">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
3、重启apache服务器