配置网站后访问出现以下提示
禁止访问!
您无权访问所请求的目录。 这是由于没有主页或该目录不允许被读取导致的。
如果您认为这是一个服务器错误,请联系网站管理员。
Error 403
localhost
Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.2.29
-
解决方案
-
查看文件权限
-
修改Apache配置文件httpd.conf中关于目录访问权限设置
# # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # <Directory> blocks below. # <Directory /> AllowOverride none Require all denied </Directory> #增加自定义项 <Directory "F:/"> AllowOverride All Require all granted </Directory>
-
如果仍未解决还需关闭selinux,重启生效
-