简体   繁体   English

我在本地主机中获取文件树

[英]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.

相关问题 为什么不是我的实时服务器在我的本地主机上获得未定义的变量或索引? - Why am I getting Undefined variable or index on my localhost by not my live server? 我无法在本地主机的php文件中进行会话。 即使我创建了会话,我仍被重定向 - I am unable to make a session in my php file in localhost. I am redirected even though i created a session 我的.htaccess文件出现以下错误 - I am getting the following error with my .htaccess file 尝试连接到本地主机phpmyadmin时出现错误 - I am getting error while trying to connect to localhost phpmyadmin 为什么我在 phpmyadmin localhost 中收到这么多错误消息? - Why am I getting so many error messages in phpmyadmin localhost? 我正在尝试通过我的应用程序下载文件,但出现此错误 - I am trying to download file through my application but am getting this error 我很难让我的 .htaccess 文件在我的远程服务器上工作 - I am having difficulty getting my .htaccess file to work in my remote server 尝试在我的实时网站上上传文件时,我遇到了move_uploaded_file错误 - I am getting error for move_uploaded_file while trying to upload file on my live site 当我从android应用程序调用我的php文件时,我收到一些额外的消息 - I am getting some extra message when i call my php file from android app 我在magento网站中收到错误消息 - I am getting the error in my magento site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM