LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   showing the files in htdocs (http://www.linuxquestions.org/questions/linux-software-2/showing-the-files-in-htdocs-448494/)

GeorgeP 05-25-2006 02:28 PM

showing the files in htdocs
 
Hello! I can't set my Apache Server to show the list of files from the htdocs directory. Can somebody help me please!

jeelliso 05-25-2006 02:56 PM

I know you can do it in ASP with the files collection.
http://www.w3schools.com/asp/coll_files.asp

Any server side scripting language should be able to interact with the filesystem and print this information.

~Justin

GeorgeP 05-25-2006 03:14 PM

Thank You for your reply!
I can do this with php but Apache can do this automaticaly. On Windows this is enabled by default. I'm interested in doing this on my Suse Linux. Insted of showing this list, i get the following message: "acess forbidden".
On what I have found on the Internet by now this might be called "Indexing"

jeelliso 05-25-2006 03:23 PM

Sorry, I was looking for a different kind of solution than you were looking for. I understand what you are looking for now, but unfortunantly I can't remember how to fix it. I'll take a look at my apache configs and report back if I find something. If you figure it out, please post what you find because I'd also like to know.

~Justin

robbbert 05-25-2006 03:33 PM

There's a config file where you can set that. Formerly, that was httpd.conf, now (on my current Ubuntu system) it's apache2.conf.

In a terminal, become root.
Quote:

# locate apache2.conf
# name-of-your-texteditor path-to-apache2.conf
There, find the term "<Directory", followed by the physical path to the directory for which you'd like to enable directory browsing.
On my own system, there's an entry,
Quote:

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
Note the option "Indexes": This one enables directory browsing.

GeorgeP 05-29-2006 01:36 AM

Thank you guys! You helped me alot!!! I'll try this and i'll let you know if it's really works :)

GeorgeP 05-30-2006 01:38 AM

<Directory "/srv/www/htdocs">
# Possible values for the Options directive are "None", "All",
# or any combination of:
#Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.2/mod/core.html#options
# for more information.
Options none
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride None
# Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>

This is what i have found in "default-server.conf". I simply changed "Options none" with "Options All".

That's it. Thank you again, guys!


All times are GMT -5. The time now is 11:37 AM.