phpStudy访问目录
phpStudy在添加站点时默认vhosts文件为:
<VirtualHost *:80> DocumentRoot "C:\**\**" ServerName www.***.com ServerAlias <Directory "C:\**\**"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
这样只能访问网站,无法访问目录和文件.
添加站点后需要手动修改一下:
<VirtualHost *:80>
DocumentRoot "C:\**\**"
ServerName www.***.com
ServerAlias
<Directory "C:\**\**">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex index.php index.html error/index.html
</Directory>
</VirtualHost>
这样就可以正常访问目录了
评论列表
111.172.6.*
2020-07-20