LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache.. (https://www.linuxquestions.org/questions/linux-software-2/apache-158296/)

bulzbb 03-16-2004 01:17 AM

Apache..
 
When I typed www.mydomain.com/ and there is no index.html, internet browser shows all the files in there. Is there a way to disable this? Been reading the docs, no luck (maybe I missed it).

Thanks. :)

hypexr 03-16-2004 03:10 AM

Why wouldn't you just have an index.html?

bulzbb 03-16-2004 03:11 AM

Because there are other folders in the same directory. Which means if they type the folder, they will be able to see whatever in that folder (Or do you suggest having index.html in every folder?)

Thanks. :)

larstj 03-16-2004 04:56 AM

You can use the DirectoryIndex directive to specify default files (such as index.html).

To get rid of the directory listings when apache cannot find a default file, you have to look for something like "Options Indexes [other_options]" in the httpd.conf file. Typically this resides within a Directory directive.
You can safely remove the "Indexes" option-keyword, and after restarting apache, the webserver should return an error to the browser in stead of the listing.

Regards.

bulzbb 03-16-2004 05:02 AM

Bingo!! Thanks for that, it works! :):)


All times are GMT -5. The time now is 03:27 AM.