我知道有这个类似的问题,但他们不解决我的问题。
我已经使用虚拟主机,它是直到今天早上发生了此错误之前运行,当我试图访问此链接http://www.notification.test/
我有这种类型的错误。
未找到所请求的URL /没有被此服务器上找到。阿帕奇/ 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是47年4月2日。
需要一些帮助球员谢谢。
基本上,它只是一个缺少/
看到<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
如果你只是用其他电脑在自己的网络是一个有点不必要。而是使用Require ip 192.168.0
例如,允许在自己的网络之外的本地网络接入,但没有任何IP。