【问题标题】:xampp change document rootxampp 更改文档根目录
【发布时间】:2012-04-26 19:00:06
【问题描述】:

我有 Eclipse IDE,并且在“C:/users/matt/documents/web/”中设置了一个工作区。我在文件夹 test“C:/users/matt/documents/web/test”中建立了一个名为 test 的项目。我已将 httpd 文件中的 Document root 更改为“C:/users/matt/documents/web/”,

我将“C:/users/matt/documents/web/test”放入浏览器,但无法访问工作区中的文件,http://localhost/xampp/web/test/http://localhost/web/test/http://localhost/test/ 也是如此。

我对服务器配置不了解,请帮助!

【问题讨论】:

  • 更改文档根目录后是否重启了网络服务器?
  • 抱歉我的回答我误读了有关文档根目录以及您如何更改它的问题。 Zolex 是对的!

标签: php eclipse xampp apache


【解决方案1】:

更改配置后重新启动您的网络服务器!

【讨论】:

    【解决方案2】:

    c:\XAMPP\apache\conf\httpd.conf

    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
    
        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>
    

    重启apache web服务器,然后 ... 进入: http://localhost/test

    查看过去的question

    【讨论】:

      【解决方案3】:

      确保您也更改了 your\path\to\apache\conf\extra\httpd-ssl.conf 中的 DocumentRoot。

      【讨论】:

      • 在我这样做之前,我一直在(错误地)追逐 403 权限问题,谢谢!
      猜你喜欢
      • 1970-01-01
      • 2017-08-25
      • 1970-01-01
      • 1970-01-01
      • 2012-08-11
      • 2016-06-21
      • 2017-06-25
      • 2019-03-23
      • 2017-08-31
      相关资源
      最近更新 更多