php xampp 更改文档根目录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10157333/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xampp change document root
提问by Matthew Underwood
I have eclipse IDE and I have set up a workspace in "C:/users/matt/documents/web/". I set up a project called test in the folder test "C:/users/matt/documents/web/test". I have changed the Document root in the httpd file to "C:/users/matt/documents/web/" and the same for
我有 Eclipse IDE,并且在“C:/users/matt/documents/web/”中设置了一个工作区。我在文件夹 test "C:/users/matt/documents/web/test" 中设置了一个名为 test 的项目。我已将 httpd 文件中的文档根目录更改为“C:/users/matt/documents/web/”,对于
I put "C:/users/matt/documents/web/test" into the browser but I can't access the files in the workspace, same for http://localhost/xampp/web/test/, http://localhost/web/test/and http://localhost/test/.
我将“C:/users/matt/documents/web/test”放入浏览器,但我无法访问工作区中的文件,对于http://localhost/xampp/web/test/,http://localhost/web/test/和http://localhost/test/.
I'm out of my depth with server configurations, please help!
我对服务器配置不够了解,请帮忙!
回答by Tineo
c:\XAMPP\apache\conf\httpd.conf
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>
Restart apache web server, then ... Enter: http://localhost/test
重启apache web服务器,然后...输入: http://localhost/test
Check past question
检查过去的 问题
回答by Andreas Linden
Restart your webserver after changing its config!
更改配置后重新启动您的网络服务器!
回答by falux
Make sure you change DocumentRoot in your\path\to\apache\conf\extra\httpd-ssl.confas well.
确保您也更改了 DocumentRoot your\path\to\apache\conf\extra\httpd-ssl.conf。

