为什么会是这个情况
全部按照视频来的,怎么会这样?
找到Apache的\conf目录下的httpd.conf文件,打开它,找到下面这两行:
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
把它改成下面这样:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
这个你做了没有?
如果做了:那么按照一下方式去配置
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "F:\wamp\www\blog\public"
ServerName laravel.ys7.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
然后,我再稍微问一下,你确定你的www目录没错嘛?是D盘下的DEMO这个目录?
看阿帕奇官方文档啊,权限的问题 将<Directory />
AllowOverride None
Require all denied
</Directory>里面的 两行代码
改为<Directory />
#AllowOverride None
#Require all denied
</Directory>
我的按视频操作也出现这问题,找了半天发现是这里的问题,httpd.conf文件关于DocumentRoot "D:/webdir/"下边的权限需要注释掉,视频只提到了<Directory "D:/webdir/">的权限问题
DocumentRoot "D:/webdir/"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
# AllowOverride none
# Require all denied
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
举报