为什么会是这个情况

来源:2-4 WAMPServer多站点配置

疯马少年

2015-12-16 23:21



全部按照视频来的,怎么会这样?http://img.mukewang.com/567181360001466913660736.jpg

写回答 关注

6回答

  • 单色彩虹
    2015-12-18 16:41:19
    已采纳

    找到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这个目录?

    疯马少年 回复单色彩虹

    是用的wamp。可以了,谢谢大神。

    2015-12-19 15:34:17

    共 4 条回复 >

  • 楽冷风清
    2015-12-21 18:21:57

    看阿帕奇官方文档啊,权限的问题 将<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.

    #


  • 疯马少年
    2015-12-18 13:24:34

    567397ff00019bc804210169.jpghttp://img.mukewang.com/56739858000117cf07950474.jpg

    567397ff000120c005000299.jpg

    有什么不对的吗?


    格劳修斯

    回复 单色彩虹请问去配置的意思是将这几行代码粘贴到文件中,还是其他的操作??

    2016-03-23 14:21:17

    共 7 条回复 >

  • 疯马少年
    2015-12-17 22:28:42

    php.ini?

  • 单色彩虹
    2015-12-17 20:38:11

    1、确定你的端口是80

    2、确定你更改了httpd.conf文件开启了虚拟路径(我描述有点问题,你懂就可以)这个选项

    2.1 我有点忘了,这个文件php.ini 貌似也是要配置的

    3、确定你更改了httpd-vhosts.conf文件设置正确

    4、确定你更改了host文件

    5、确定你重启了wamp(或者其他)所有的服务

    6、确定你重启浏览器(这个其实无所谓,最好重启)

    单色彩虹 回复疯马少年

    嗯,对的

    2015-12-18 09:38:43

    共 4 条回复 >

  • lynhao
    2015-12-17 12:52:01

    在localhost后面加个80端口号就可以了

    疯马少年 回复lynhao

    按照楼下说法,我已检查80端口,显示是apache还有php,这没问题吧?然后其他的我也都检查了,httpd。conf文件有修改为Allow from all,host文件有改,视频里有改我也就有改,还是不知道错在哪里。

    2015-12-18 13:13:18

    共 3 条回复 >

PHP入门篇

PHP入门教程轻松学习,行业大牛帮您快速掌握PHP编程基础知识。

455583 学习 · 6303 问题

查看课程

相似问题