LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-06-2004, 02:55 AM   #1
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
Spiffing up Apache HTTP directory listing?


I run a (legal) public FTP/HTTP/Audio streaming server @ http://osrv.servehttp.com . If you click on the music section and choose to browse tunes via HTTP, the Apache-style directory listing comes up (I configured it that way). But it's really different from the rest of the stuff on the site. So I'm wondering, is there a way I can customize the directory listing pages to fit the look of the rest of the site? It would be soooo nice to make it match the site - then I'd slide it in the site in a frame (instead of a pop-up).

Thanks all!!

PS - You guys have always been there for me when I had linux issues from the start of my interest, and I would have not ever been able to serve this stuff without your help! Now I'm a complete linux nut and a pretty fierce warrior at the command line. Major thank-yous to everyone!
 
Old 06-06-2004, 08:13 AM   #2
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
are you looking for the module mod_autoindex ?

http://httpd.apache.org/docs/mod/mod_autoindex.html

Also see this link if you are interested on the colors of the page etc.
http://fsinfo.cs.uni-sb.de/~abe/apache-tips/#patch

PS:On a side note when I went to your site I could not find the link to music and found that only when
i did a search. The problem was that the link was on the top frame and it had no scroll bars and was hidden from view. ( screen resolution 1024x768)

Last edited by zeropash; 06-06-2004 at 08:15 AM.
 
Old 06-06-2004, 09:56 PM   #3
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
You really can't see the links? That's interesting ... I'm gonna look more into that. Are you using Mozilla? Linux?

I'm gonna check out the links you posted, thanks!

-edit-

Yup, I'm using mod_autoindex. That patch looks really good, but will it work on httpd-2.0.49? I'm not sure how to apply the patch either, what should I type?

Last edited by orange400; 06-06-2004 at 10:26 PM.
 
Old 06-07-2004, 03:15 AM   #4
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
If you're using php, then you could use an index.php file like this one, or even better, this one.

You can find other scripts like this at http://php.resourceindex.com/ by searching for the keywords 'directory index'.

Enjoy!
--- Cerbere

[edit] If you haven't set up for index.php to be a default page, you'll have to edit httpd.conf where it says this:
Code:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
    DirectoryIndex index.html
</IfModule>
Make it look like this:
Code:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
    DirectoryIndex index.html index.php
</IfModule>
[/edit]

Last edited by Cerbere; 06-07-2004 at 03:27 AM.
 
Old 06-07-2004, 04:57 AM   #5
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
yeah I guess index.php is a better option.
regarding the patch I am trying to use it with 2.0.40 (requires some changes) which I have. If it works fine will try it on 2.0.49 and send it across . if interested send a mail to me my email id is : zeropash AT yahoo DOT com
letme try it first
 
Old 06-08-2004, 01:24 AM   #6
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
I updated the site to work with Linux I am stuck using my sis' computer because mine fried, and she runs MS. But let's just say I live Live CDs ... I'm running Knoppix 3.3 right now, w00t

I'm gonna try that php stuff. I don't have a clue how php works, but as long as someone else made it and it works, I'm set.
 
Old 06-10-2004, 03:06 AM   #7
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
I tried that "even better" PHP script and it didn't work ...

I extracted the php into the root html directory of the server and edited the config properly ...

Do I have to restart apache after this?

Last edited by orange400; 06-10-2004 at 03:07 AM.
 
Old 06-10-2004, 04:29 AM   #8
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
you have put the index.php in the root directory. now when you go to the site it will show the
root directory listing.

you should rather put the index.php in the users directory.and things will work fine.

btw now I am able to see the links to music in the top frame.

Last edited by zeropash; 06-10-2004 at 04:30 AM.
 
Old 06-11-2004, 01:11 AM   #9
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
Haha, it works!! Now all I gotta do is make it orange. Thanks so much everybody!

zeropash - beat ya to it Went to 192.168.1.100 (cause I'm on the network with the server) and noticed that it listed the directory IN PHP (!) rather than showing the homepage. Then I moved index.php into the users directory, and BAM it worked!
 
Old 06-11-2004, 01:28 AM   #10
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
Here it is! http://osrv.servehttp.com/users !

I shows up nicely in frames when viewed through http://osrv.servehttp.com

Last edited by orange400; 06-11-2004 at 02:53 AM.
 
Old 06-11-2004, 02:47 AM   #11
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
you forgot to remove the index.php from the root.
 
Old 06-11-2004, 02:51 AM   #12
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
hmm ... try refreshing your browser, index.php does not exist in / anymore ...
 
  


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 06:03 AM
apache directory listing doralsoral Linux - Software 2 06-15-2005 07:37 AM
apache - directory listing thejackal13 Linux - Software 1 01-05-2005 10:31 AM
Directory Listing with apache aroop Linux - Networking 2 06-02-2004 02:50 AM
apache 2 directory listing jwatco2001 Linux - Software 5 06-07-2003 06:29 PM

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

All times are GMT -5. The time now is 12:35 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