[英]I am getting file tree in my localhost
I have downloaded the entire site from the remote server c panel and uploaded it into a local server (xampp/htdocs). 我已经从远程服务器c面板下载了整个站点,并将其上载到本地服务器(xampp / htdocs)。
When I open this in my browser I can only see the file tree: 当我在浏览器中打开它时,我只能看到文件树:
How do I fix this? 我该如何解决?
I want to run my website on a local server. 我想在本地服务器上运行我的网站。
Please help me. 请帮我。
So in order to change the default web directory you need to change the httpd.conf (should be located in apache/conf/httpd.conf) Look for DocumentRoot and change the value for the Directory. 因此,为了更改默认的Web目录,您需要更改httpd.conf (应位于apache / conf / httpd.conf中)。查找DocumentRoot并更改Directory的值。
Also once you are at it you might want do disable directory listings unless you really need it. 另外,一旦您真正需要它,您可能想要禁用目录列表。 In the httpd.conf look for someting like:
在httpd.conf中查找类似以下内容的东西:
Options Includes Indexes FollowSymLinks MultiViews
and remove the Indexes, so it loks something like: 并删除索引,因此它看起来像:
Options Includes FollowSymLinks MultiViews
Once you are done, save the changes and don't forget to restart Apache. 完成后,保存更改,并且不要忘记重启Apache。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.