<VirtualHost *:80>
DocumentRoot "D:/web/laravel/public"
ServerName loca.laravel.com
<Directory "D:/web/laravel/public">
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
重点来了。如果切换到nginx环境,就报禁止访问的错误。
手动修改nginx.conf文件。增加一个server即可。
server {
listen 80;
server_name loca.laravel.com;
set $root_path 'D:/web/laravel/public';
root $root_path;