简体   繁体   中英

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).

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.

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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM