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
 
LinkBack Search this Thread
Old 02-23-2004, 11:03 PM   #1
Snorideguy
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
Display a list of files in a folder in apache


Hi... I'm still new at this but kinda good at it. I have apache running and hosting multiple web sites using virtual hosts but I am pickled by something I am trying to do... I want apache to be able to create an index page of files in a folder for me if I point it to that folder. I know there is even a way to set up Icons in the httpd.conf file but I'm not going to tear that up until I can get this working. I am using apache 2 and would like to get this up and running.

(another question, can't figure this out either) I would like to use a virtual host and a wild card to start a download on a file for example I want to be able to type aaw.alternatesolutions.com and have it download a hosted copy of a program. I currently have it set up as media.alternatesolutions.com and it directs me to the folder I would like and index created for (Hense the above question ) but would still like to do this. would I possibly be better off to direct aaw.alternatesolutions.com to an index.html file that starts the download for me? I have not experimented with this and how would I get this to work?

Any and all help will greatly be appriciated and I have found that this forum is awesome because people answer questions that others ask and not dance around the issue. I suppose thats how the open source community is supposted to work. Thanks.
 
Old 02-23-2004, 11:10 PM   #2
saint
Member
 
Registered: Sep 2001
Location: India
Distribution: Red Hat 9
Posts: 55

Rep: Reputation: 15
Please see fb2index (http://freshmeat.net/projects/fb2index/) . It is a PHP script and quite well written. Of course, you must PHP installed in your apache. If you know PHP, you can further hack it up yourself.

About your second questio, I would suggest reading a book on Apache. Do not say that you ahve read the Apache manual and cannot find anything useful there. manuals are for reference, not for learning.

HTH
 
Old 02-24-2004, 03:54 PM   #3
Snorideguy
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the great link. That script fit exactly what I was looking for. but I do have one more question based on that script.

The README file that comes with it says that you can set up a DocumentIndex variable in my httpd.conf that goes as

Code:
DocumentIndex index.php index.html index /fb2index.php
I love the idea of it being automatic and I set mine up like this...

Code:
DocumentIndex index.php index.html index /tools/indexing/fb2index.php
obviously I set the folders the same way, and I had it working... but then it stopped after I had changed nothing. I can't figure it back out.

Thanks in advance.
 
Old 02-25-2004, 06:27 AM   #4
saint
Member
 
Registered: Sep 2001
Location: India
Distribution: Red Hat 9
Posts: 55

Rep: Reputation: 15
It will be hard to say what is wrong with your setup. Removing the /tool/... line and see what happens. You will have to place the fb2index file in all the directories which you want to index.
 
Old 02-26-2004, 01:05 PM   #5
Snorideguy
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks saint.

I actually found the same problem in a different forum. If anyone is interested I had 2 elements that were holding me back on this working properly

1) it is DirectoryIndex... not DocumentIndex

2) the reason it was not working is because I was using a virtual host at media.alternatesolutions.com which was automatically bringing me to www.alternatesolutions.com/media and it was automatically adding the trailing / which causes it not to work. The line DirectoryIndex index.php index.html index /tools/indexing/fb2index.php just tells it to use index.php before index.html and if those can't be found than to use anything that has index in it and as a last resort (Fallback) to use the file located in tools/indexing. I didn't understand this line until I read more about it.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE/Konquerer archives displaying in folder list bytesniper Linux - Software 0 06-11-2005 08:14 PM
How can you get a list (names) of pictures from a web folder? Laser Devil Programming 5 06-11-2005 12:51 AM
Samba - XP can't list folder contents p0tw0r Linux - Networking 1 05-31-2005 03:37 AM
Apache won't display files in DocumentRoot PiGuy Linux - Newbie 6 01-21-2005 01:33 PM
how to upload files to apache folder? alexii86 Linux - Newbie 4 10-06-2003 02:05 AM


All times are GMT -5. The time now is 12:52 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration