關(guān)于localhost404打不開的朋友看過來
1.找到Apache下的conf/extra/http-vhosts.conf文件,在里面添加
<VirtualHost *:80>
DocumentRoot "根目錄(默認(rèn)是www,但是我們已經(jīng)改為demo)"
ServerName localhost
</VirtualHost>
保存。重啟wamp。
2.然后我又發(fā)現(xiàn)錯誤提示不再是404,而是Unable to open WampServer's config file, please change path in index.php file。很明顯我們要修改index.php中的路徑。
搜索wampmanager.conf,把路徑改成我們的wampmanager.conf的路徑就可以,
比如我的是$wampConfFile = 'D:/wamp/wampmanager.conf',保存重啟。localhost正常訪問!
2017-10-03
根據(jù)你說的改完之后本來404.3的錯誤成了404.0的錯誤,求賜教
2017-07-16
index.php中的路徑找不到$wampConfFile?
2016-09-14
我按照你上面的改了之后圖標(biāo)從橙色變成綠色了,但是localhost打不開顯示403,www.test.com?打開顯示
( ! )?Parse error: syntax error, unexpected end of file, expecting ',' or ';' in F:\demo\test01\index.php on line?3
www.test02.com?倒是成功了,有沒有解決方法= =
2016-06-23
太感謝你了,我裝的wamp3.04,修改demo路徑后一直404,困擾了我兩天
2016-05-18
贊一個
2016-05-18
wampserver 2.5 僅供參考
==========================
httpd.conf 文件
<Directory "D:/wampProject/"> //個人設(shè)置路徑
? ? # AllowOverride FileInfo AuthConfig Limit
? ? #
? ? AllowOverride all
Require all granted
? ? # ? ?
# Controls who can get stuff from this server.
? ? #
# onlineoffline tag - don't remove
? ? Require local
</Directory>?
=========================
hosts文件 添加
127.0.0.1 ? ? ? www.test.com
127.0.0.1 ? ? ? www.test02.com
====================
httpd-vhosts.conf 文件添加
<VirtualHost *:80>
? ? DocumentRoot "D:/wampProject/test"
? ? ServerName www.test.com
</VirtualHost>
<VirtualHost *:80>
? ? DocumentRoot "D:/wampProject/test02"
? ? ServerName www.test02.com
</VirtualHost>
2016-05-17
感謝,不然我真要?dú)獾囊央娔X砸了
2016-04-26
wampserver3 在www目錄下的index.php文件中沒有搜索到wampConfFile這個詞
2016-03-09
按您說的改的,打開的頁面logo和小圖標(biāo)都不見了,怎么辦?
2015-12-18
這個問題困擾了我半天,謝謝解答!??!