Hallo!

I have this problem.

Haw can i change default page. When I run http://localhost:80 I seeing "Index of /" and list of whole directory and files. I want change "Index of /" with "My server /".

Any suggestion?

use php 5, Apache 2, MySQL 5

Thanx.

    If you want to change the folder than Apache looks for files to serve, you'll need to edit the configuration file. This can be found in the "conf" subdirectory of your Apache installation.

    There are two lines you'll need to edit. The first one is this:

    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

    Several lines below you'll see this one:

    <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">

    Both need to have the same path, but you can change it to any folder you want.

    Another thing that may be happening is that you may not have an index file for Apache to serve, or it may not be looking for the correct file. If you have an index.php document, this won't be served by default. You'll need to add it. The order, from left to right, indicates the priority that a given page has to be loaded as the index. I.e., in the below example, an index.php file will be loaded first. If there isn't one, index.html will be loaded. If there's no index.html, index.htm will be loaded. If that file doesn't exist either, a directory listing will be displayed (showing you all files in the directory).

    <IfModule dir_module>
        DirectoryIndex index.php index.html index.htm
    </IfModule>

      Thank you, banzaimonkey for quick replay!

      But this is not resolve problem 🙂

      I want modify default page where flow dir and file. Where you see "Index of /" in the top of the page.

      This is the problem ....

        Hm... The directory listing ("Index of /") is a page that is generated by Apache. It's not actually stored anywhere.

        mod_autoindex can be used to change the way files are formatted, but I don't know about changing the "Index of /" bit.

        You can always create the index page by hand, or have one dynamically created with a php or cgi script.

          Write a Reply...