為什么wampserver3.0修改httpd.conf的documentroot無效
#?symbolic?links?and?aliases?may?be?used?to?point?to?other?locations. # DocumentRoot?"D:/test" <Directory?"D:/test/"> ????# ????#?Possible?values?for?the?Options?directive?are?"None",?"All", ????#?or?any?combination?of:
2016-06-04
將httpd.conf 中做如下更改:
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
再重啟服務(wù)
2019-10-22
Step1. 自定義網(wǎng)站根目錄
?1)修改D:\wamp64\bin\apache\apache2.4.23\conf\httpd.conf文件,如將:
DocumentRoot "${INSTALL_DIR}/www" 改為 DocumentRoot "d:/PHPdemo/www"
<Directory "${INSTALL_DIR}/www/"> 改為 <Directory "d:/PHPdemo/www/">
S
?2)修改D:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf文件,如將:
DocumentRoot D:/wamp64/www 改為DocumentRoot D:/PHPdemo/www
<Directory? "D:/wamp64/www/"> 改為<Directory? "D:/PHPdemo/www/">
這個(gè)改動(dòng)很關(guān)鍵,因?yàn)閔ttpd.conf文件中,默認(rèn)定義了:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
所以需要修改httpd-vhosts.conf,否則會(huì)出現(xiàn)第1步修改沒效果(瀏覽器打開localhost還是老樣子)
Step2. 以下為修改左鍵點(diǎn)擊samp圖標(biāo)‘www根目錄’名稱和指向
?3)修改D:\wamp64\wampmanager.ini文件,修改下Caption和FileName,如:
Type: item; Caption: "demo_www"; Action: shellexecute; FileName: "D:/PHPdemo/www"; Glyph: 2
?4)修改D:\wamp64\wampmanager.tpl文件,修改下Caption和FileName,如:
Type: item; Caption: "demo_www"; Action: shellexecute; FileName: "D:/PHPdemo/www"; Glyph: 2
2016-05-20
點(diǎn)擊localhost還是原來的主頁(yè)