【问题标题】:The requested URL / was not found on this server. in Wamp 3.1.0在此服务器上找不到请求的 URL /。在 Wamp 3.1.0 中
【发布时间】:2019-02-09 05:36:21
【问题描述】:

我知道有类似的问题,但没有一个能解决我的问题。

我已经使用了虚拟主机,它之前一直在运行,直到今天早上我尝试访问此链接时出现此错误http://www.notification.test/

我遇到了这种错误。

未找到 在此服务器上找不到请求的 URL /。 Apache/2.4.27 (Win64) 服务器位于 www.notification.test 端口 80

我的主机中有这个127.0.0.1 www.notification.test 这是我在C:\wamp64\bin\apache\apache2.4.27\conf\extra中的设置

<VirtualHost *:80>
    DocumentRoot C:/wamp64/www/notification/public
    ServerName www.notification.test
        <Directory C:/wamp64/www/notification/public>
            Options +Indexes +Includes +FollowSymLinks +MultiViews
            AllowOverride All
            Require all granted
        </Directory>
</VirtualHost>

我只是按照另一篇帖子的建议添加目录,但没有用。

我的 Wamp 版本是 3.1.0,在 64 位 windows7 操作系统上运行,而 Apache 是 2.4.47。

需要一些帮助,谢谢。

【问题讨论】:

    标签: apache wampserver


    【解决方案1】:

    基本上它只是缺少/ 请参阅&lt;Directory..... 参数。

    <VirtualHost *:80>
        ServerName notification.test
        ServerAlias www.notification.test
        DocumentRoot "C:/wamp64/www/notification/public"
            <Directory "C:/wamp64/www/notification/public/">
                Options +Indexes +Includes +FollowSymLinks +MultiViews
                AllowOverride All
                Require all granted
            </Directory>
    </VirtualHost>
    

    你的 HOSTS 文件应该是这样的

    127.0.0.1 localhost
    127.0.0.1 notification.test
    
    ::1 localhost
    ::1 notification.test
    

    注意:

    Require all granted 如果您只是在自己的网络中使用其他 PC,则有点不必要。例如,请改用Require ip 192.168.0,以允许本地网络中的任何 ip 访问,但您自己网络之外的任何 ip。

    【讨论】:

    • 仍然无法正常工作....我什至无法访问本地主机...http://locahost/phpmyadmin.
    猜你喜欢
    • 1970-01-01
    • 2017-03-21
    • 2010-10-16
    • 1970-01-01
    • 2016-08-07
    • 2017-12-26
    • 2015-03-30
    • 2014-12-13
    • 2016-10-31
    相关资源
    最近更新 更多