[問題] apache root directory
請問要如何改變 apache 的 root dir?
原來設定檔 httpd.conf 中的 DocumentRoot "C:/Program Files/Apache2.2/htdocs"
想要更改為 DocumentRoot "D:/root"
目錄都已經建好了,也直接複製原來的 index.html 過去測試
但是總是出現 403 Forbidden
請問到底是哪裡出了問題呢?
補充一下環境設定
Windows XP SP3
Win32 Binary including OpenSSL 0.9.8r (MSI Installer)
http://ftp.tc.edu.tw/pub/Apache//httpd/binaries/
win32/httpd-2.2.19-win32-x86-openssl-0.9.8r.msi
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.229.0.155
推
08/28 18:24, , 1F
08/28 18:24, 1F
※ 編輯: logs 來自: 125.229.0.155 (08/28 18:33)
→
08/28 18:51, , 2F
08/28 18:51, 2F
推
08/28 18:52, , 3F
08/28 18:52, 3F
我應該有確實重啟服務,以下是測試流程
1. 安裝完後的原始設定 DocumentRoot "C:/Program Files/Apache2.2/htdocs"
2. 確認 service 是開啟的
3. 瀏覽器測試 -> It's work!
4. 更改為 DocumentRoot "D:/root"
5. httpd.conf 存檔
6. 重新啟動服務
7. 瀏覽器測試 -> Forbidden
8. 改回原始設定 DocumentRoot "C:/Program Files/Apache2.2/htdocs"
9. httpd.conf 存檔
10.重新啟動服務
11.瀏覽器測試 -> It's work!
[額外測試]
12.更改為 DocumentRoot "E:/root" (E:\root 為不存在目錄)
13.httpd.conf 存檔
14.重新啟動服務 --> 無法啟動服務
Step 1~11 應該可證明重啟服務的方式是正確的
※ 編輯: logs 來自: 125.229.0.155 (08/28 20:21)
推
08/28 20:50, , 4F
08/28 20:50, 4F
→
08/28 20:51, , 5F
08/28 20:51, 5F
設定讀取權限 everyone 全開後還是 forbidden
連路徑設定到 FAT32 這種沒有安全性及權限問題的磁碟仍是 forbidden
若改另外一家的 httpd 則完全沒有這個問題
http://www.st.rim.or.jp/~nakata/
但是我想用 apache 啊...
※ 編輯: logs 來自: 125.229.0.155 (08/28 21:58)
推
08/28 22:14, , 6F
08/28 22:14, 6F
→
08/28 22:14, , 7F
08/28 22:14, 7F
→
08/28 22:17, , 8F
08/28 22:17, 8F