添加多站點之后出現The requested URL / was not found on this server.
添加多站點之后出現The requested URL / was not found on this server.沒有添加多站點之前localhost能進去,加了之后就進不去了。
添加多站點之后出現The requested URL / was not found on this server.沒有添加多站點之前localhost能進去,加了之后就進不去了。
2015-01-06
舉報
2015-01-11
試了下。
在httpd-vhosts.conf中增加下面代碼,直接用localhost就能訪問。即把localhost也當成一個虛擬站點,其對應的目錄即可訪問。
<VirtualHost *:80>
? ? DocumentRoot "F:/Demo"
? ? ServerName localhost
</VirtualHost>
不知有沒有其他方法?
2017-05-23
我也遇到這個問題了。應該是“httpd-vhosts.conf”的事,但是不知道怎么改,大神給解答一下啊。
2017-03-16
能告訴怎么解決的嗎?我單個站點是可以的,一配置多個站點總是The requested URL / was not found on this server.
2016-04-22
可以了 不錯
2016-03-13
大神? 膜拜
2016-02-28
厲害啊
2016-01-21
如果想讓127.0.0.1和localhost也能訪問根目錄的話如下
<VirtualHost ?*:80>
? ? DocumentRoot "D:/wamp/www/"
? ? ServerName "localhost"
? ? DirectoryIndex "index.php"
? ?<Directory "D:/wamp/www/">
? ? Options FollowSymLinks
? ? AllowOverride All
? </Directory>
</VirtualHost>
<VirtualHost ?*:80>
? ? DocumentRoot "D:/wamp/www/"
? ? ServerName "127.0.0.1"
? ? DirectoryIndex "index.php"
? ?<Directory "D:/wamp/www/">
? ? Options FollowSymLinks
? ? AllowOverride All
? </Directory>
</VirtualHost>
windows/system32/drivers/etc/host文件添加
127.0.0.1 ? ? ? localhost
這樣就把localhost和127.0.0.1不能訪問根目錄的問題解決了
2016-01-21
虛擬主機配置如下:
<VirtualHost ?*:80>
? ? DocumentRoot "D:/wamp/www/"
? ? ServerName "127.0.0.1"
? ? DirectoryIndex "index.php"
? ?<Directory "D:/wamp/www/">
? ? Options FollowSymLinks
? ? AllowOverride All
? </Directory>
</VirtualHost>
2016-01-15
修改完成之后重啟一下服務器就可以了!
2015-06-26
還是不可以啊