用xampp建站后发现无法访问

一般会有一个界面出现。

Access forbidden!

You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Error 403

这个嘛,我因为没用vhost之前是正常的,后来用了就发现错误了。结果想了想就直接把httpd.conf里的设置挪了过去。

<Directory D:/website/>
Options Indexes FollowSymLinks Includes ExecCGI

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

# Controls who can get stuff from this server.
#
Require all granted

</Directory>

之后果然正常了-

 

此条目发表在网站基础分类目录。将固定链接加入收藏夹。