LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Directory Listing (https://www.linuxquestions.org/questions/linux-software-2/directory-listing-74919/)

mattbeekler 07-22-2003 01:26 PM

Directory Listing
 
Hi,
im trying to setup a small server, and I want to host some files so people can just look straight into the folder and get what they want, but when I try to go to the folder (mysite.com/files) it tells me forbidden. I checked the permissions and it seems like it should work.

Im using the graphical version on RedHat 9 if Apache, how can I make directory listing work?

tangle 07-22-2003 01:35 PM

Are you trying to do this via ftp or http?

mattbeekler 07-22-2003 01:37 PM

just http although FTP would be nice also, i am focusing on HTTP

dkaplowitz 07-22-2003 01:38 PM

Hi,

Though I'm not sure exactly where the "enable directory browsing" line is in the file, but I'd look in httpd.conf, which in Redhat9 is in /etc/httpd/conf/

mattbeekler 07-22-2003 01:39 PM

but if I edit the httpd.conf the graphical interface overwrites it i believe.

i guess i could not use the graphical interface :) im just a little lazy.

dkaplowitz 07-22-2003 01:44 PM

I don't know the gui interface for httpd at all, but I imagine that it would only over-write if you made a change that would affect what you manually changed in the httpd.conf file.

I just had a quick look at my httpd.conf file (on a server I've not made any changes to) and I don't see anything about directory browsing, so there's a chance it might not be in that file anyway.

stickman 07-22-2003 01:52 PM

Quote:

Originally posted by mattbeekler
but if I edit the httpd.conf the graphical interface overwrites it i believe.
i guess i could not use the graphical interface :) im just a little lazy.

That is a choice that you'll have to make. There are some advantages to directly modifying the conf file. For starters, you become familiar with how Apache works and what it is capable of doing. As you start doing more advanced things with Apache, you may find that your GUI admin tool simple doesn't have a way to configure what you want. Remote admin for a production server becomes incredibly less complex. Also, in most cases, the conf file is going to be the same across distros.

As far as the directory browsing goes, look in the conf file for Indexes in the Options line. If you don't see it in there, you may want to add it in for the appropriate directories.

dkaplowitz 07-22-2003 01:56 PM

You can try this (in httpd.conf):

Directory browsing is what happens when you don't have an index.html
file in a directory. The server returns a list of all files in the
directory. Usually this is on by default, but not if you add Virtual
Servers or otherwise mess with the httpd.conf file. To turn it on,
open httpd.conf and go to the tag for your directory:

<Directory "/usr/local/apache/htdocs">
Options FollowSymLinks MultiViews
</Directory>

And ADD the word "Indexes" to the Options, like this:

<Directory "/usr/local/apache/htdocs">
Options Indexes FollowSymLinks MultiViews
</Directory>

Then save the file and restart Apache. Done.

note that the directory "/usr/local/apache..." is different in Redhat9.

mattbeekler 07-22-2003 02:27 PM

alright, i got it, thanks for the help :)


All times are GMT -5. The time now is 01:58 AM.