亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Apache 文件根目錄設(shè)置修改方法 (Document Root)

 更新時(shí)間:2012年01月30日 12:33:36   作者:  
最近在學(xué)習(xí)WordPress,使用appServ 在windows上搭建Php開發(fā)環(huán)境
在網(wǎng)上查找到的關(guān)于修改Apache服務(wù)器根目錄的資料,對(duì)比學(xué)習(xí),再此記錄
在安裝 Apache 時(shí),系統(tǒng)會(huì)給定一個(gè)缺省的文件根目錄。
如果你覺得將網(wǎng)頁存在這個(gè)缺省目錄不方便,覺得應(yīng)該另外設(shè)個(gè)目錄作為 Apache 文件根目錄,你可以修改 Apache 的配置文件 httpd.conf 里有關(guān)文件根目錄的設(shè)置。
假設(shè)Apache HTTP Server 的缺省文件根目錄 (DocumentRoot) 是:
DocumentRoot "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"
修改 Apache 文件根目錄 (DocumentRoot) 的操作如下:

1. 為避免修改失誤,請(qǐng)先備份你的 Apache 配置文件 httpd.conf,該配置文件的路徑是:
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf

2. 打開 http.conf 文件,找到 DocumentRoot 為開頭的那一行,將
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
改成新的 DocumentRoot 路徑,比如你新的路徑為 C:\htdocs,就改成
DocumentRoot "C:/htdocs"

3. 然后找到 http.conf 文件中的如下內(nèi)容
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
將 Diectory 中的路徑改成你新設(shè)的文件根目錄,比如:
<Directory "C:/htdocs">

4. 保存配置文件http.conf 。

5. 修改了配置文件以后,應(yīng)重新啟動(dòng) Apache Service。(Start --> All Programs --> Apache HTTP Server 2.2 --> Monitor Apache Servers --> Restart)
修改了文件根目錄之后,你就可以將你的網(wǎng)頁存放在新設(shè)的目錄下了。

相關(guān)文章

最新評(píng)論