You don't have permission to access /repertory/on this server. 意思是:您沒有訪問此服務器上的權限谦炒。
通過修改vhosts.conf文件來解決
打開phpstudy → 其他選項菜單 → 打開配置文件 打開vhost.conf
phpstudy.PNG
將原來的
<VirtualHost _default_:80>
DocumentRoot "D:\phpStudy\PHPTutorial\WWW"
<Directory "D:\phpStudy\PHPTutorial\WWW">
Options -Indexes -FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
改為
<VirtualHost _default_:80>
DocumentRoot "D:\phpStudy\PHPTutorial\WWW"
ServerName www.gohosts.com
ServerAlias gohosts.com
<Directory "D:\phpStudy\PHPTutorial\WWW">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
完成