添加多站點(diǎn)之后出現(xiàn)The requested URL / was not found on this server.
添加多站點(diǎn)之后出現(xiàn)The requested URL / was not found on this server.沒(méi)有添加多站點(diǎn)之前l(fā)ocalhost能進(jìn)去,加了之后就進(jìn)不去了。
添加多站點(diǎn)之后出現(xiàn)The requested URL / was not found on this server.沒(méi)有添加多站點(diǎn)之前l(fā)ocalhost能進(jìn)去,加了之后就進(jìn)不去了。
2015-01-06
舉報(bào)
2015-01-11
試了下。
在httpd-vhosts.conf中增加下面代碼,直接用localhost就能訪問(wèn)。即把localhost也當(dāng)成一個(gè)虛擬站點(diǎn),其對(duì)應(yīng)的目錄即可訪問(wèn)。
<VirtualHost *:80>
? ? DocumentRoot "F:/Demo"
? ? ServerName localhost
</VirtualHost>
不知有沒(méi)有其他方法?
2017-05-23
我也遇到這個(gè)問(wèn)題了。應(yīng)該是“httpd-vhosts.conf”的事,但是不知道怎么改,大神給解答一下啊。
2017-03-16
能告訴怎么解決的嗎?我單個(gè)站點(diǎn)是可以的,一配置多個(gè)站點(diǎn)總是The requested URL / was not found on this server.
2016-04-22
可以了 不錯(cuò)
2016-03-13
大神? 膜拜
2016-02-28
厲害啊
2016-01-21
如果想讓127.0.0.1和localhost也能訪問(wèn)根目錄的話如下
<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不能訪問(wèn)根目錄的問(wèn)題解決了
2016-01-21
虛擬主機(jī)配置如下:
<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
修改完成之后重啟一下服務(wù)器就可以了!
2015-06-26
還是不可以啊