2012-04-14 98 views
8

我有eclipse IDE,我在「C:/ users/matt/documents/web /」中設置了一個工作區。我在文件夾測試「C:/ users/matt/documents/web/test」中設置了一個名爲test的項目。我已經將httpd文件中的文檔根目錄更改爲「C:/ users/matt/documents/web /」,並且同樣適用於xampp更改文檔根

我將「C:/ users/matt/documents/web/test」但我無法訪問工作區中的文件,對於http://localhost/xampp/web/test/,http://localhost/web/test/http://localhost/test/也是如此。

我很不熟悉服務器配置,請幫忙!

+2

更改文檔根目錄後是否重新啓動了Web服務器? – 2012-04-14 21:04:56

+0

剛剛做到了,它的工作原理。 – 2012-04-14 21:10:14

+1

爲我的回答提供意見我錯誤地閱讀了關於文檔根目錄的問題以及您如何更改此內容。 Zolex是對的! – chadpeppers 2012-04-14 21:13:22

回答

6

更改配置後重新啓動您的網絡服務器!

15

C:\ XAMPP \ apache的\的conf \ httpd.conf中

<VirtualHost *:80> 
    ServerAdmin [email protected] 

    DocumentRoot C:/users/matt/documents/web/ 
    <Directory /> 
      Options FollowSymLinks 
      AllowOverride None 
    </Directory> 
    <Directory C:/users/matt/documents/web/> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride None 
      Order allow,deny 
      allow from all 
    </Directory> 

... 輸入: http://localhost/test

檢查過去question

5

確保在your\path\to\apache\conf\extra\httpd-ssl.conf改變DocumentRoot的作爲好。

+0

我(錯誤地)追查403權限問題,直到我這樣做,謝謝! – MLeFevre 2016-10-21 21:02:27