LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-22-2003, 02:26 PM   #1
mattbeekler
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Rep: Reputation: 0
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?
 
Old 07-22-2003, 02:35 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Are you trying to do this via ftp or http?
 
Old 07-22-2003, 02:37 PM   #3
mattbeekler
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Original Poster
Rep: Reputation: 0
just http although FTP would be nice also, i am focusing on HTTP
 
Old 07-22-2003, 02:38 PM   #4
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
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/
 
Old 07-22-2003, 02:39 PM   #5
mattbeekler
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Original Poster
Rep: Reputation: 0
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.

Last edited by mattbeekler; 07-22-2003 at 02:41 PM.
 
Old 07-22-2003, 02:44 PM   #6
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
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.
 
Old 07-22-2003, 02:52 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
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.

Last edited by stickman; 07-22-2003 at 02:56 PM.
 
Old 07-22-2003, 02:56 PM   #8
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
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.

Last edited by dkaplowitz; 07-22-2003 at 02:59 PM.
 
Old 07-22-2003, 03:27 PM   #9
mattbeekler
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Original Poster
Rep: Reputation: 0
alright, i got it, thanks for the help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 07:03 AM
directory size listing with ls mikemrh9 Linux - General 2 01-05-2005 01:04 PM
apache - directory listing thejackal13 Linux - Software 1 01-05-2005 11:31 AM
print listing of directory harnadem Linux - Newbie 2 04-25-2004 10:35 PM
Java Directory Listing markdw Programming 1 04-16-2002 07:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration