在使用PHPstudy配置Laravel8的时候出现提示:
Forbidden
You don't have permission to access / on this server.
我们可以在apache的配置文件中修改一下来解决这个问题。增加一句Options +Indexes +FollowSymLinks +ExecCGI
<VirtualHost *:80>
DocumentRoot "E:/phpstudy_pro/WWW/erp/public"
ServerName www.xxx.com
ServerAlias
FcgidInitialEnv PHPRC "E:/phpstudy_pro/Extensions/php/php8.0.2nts"
AddHandler fcgid-script .php
FcgidWrapper "E:/phpstudy_pro/Extensions/php/php8.0.2nts/php-cgi.exe" .php
<Directory "E:/phpstudy_pro/WWW/erp/public/index.php">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex index.php index.html error/index.html
</Directory>
</VirtualHost>
收藏一下。