LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-11-2009, 08:58 PM   #1
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Rep: Reputation: 15
Ubuntu + Apache2 + ftp?


i currently have a website hosted with apache2. (all goes fine). However i would like to display a directory listing(a separate page).

For example. When someone clicks on a link for an html page it takes them to a page which displays all the files in a folder/directory that are available for download.(would this be an ftp? or something else?)

I hope that makes sense

Cheers
 
Old 06-12-2009, 12:13 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,071

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
Quote:
them to a page which displays all the files in a folder/directory that are available for download.(would this be an ftp? or something else?)
Apache can do a directory listing automatically, so your users can click on a filename on that listing to d/l the file. To do this there must be no index page in that directory and depending on your apache configuration you might need to add Indexes among the other options:
Code:
<Directory "/path/to/somedir">
  Options Indexes
  Allow from all
  ...
</Directory>

Last edited by bathory; 06-16-2009 at 01:54 AM.
 
Old 06-12-2009, 12:14 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
If it has to be a html page, a bit of PHP code will do the trick (if you have configured apache to use PHP)
Else you should be able to configure apache so it displays the contents of a directory (although I can not remember how) instead of a default page.

And no, it's not FTP in this case.
 
Old 06-14-2009, 07:22 PM   #4
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Original Poster
Rep: Reputation: 15
I'm not sure on php.. i'll have to learn that. (it's about time anyway).
However i have a default page in my virtual host (a module from memory). Would i need to move that module to the inside of my <directory /path to website files> as it's currently not in that section
 
Old 06-15-2009, 12:31 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,071

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
I'm not sure what you mean by default page. If you mean an index page, then the file listing will not work because apache will use that page instead of showing the contents of the directory.
 
Old 06-15-2009, 11:56 PM   #6
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Original Poster
Rep: Reputation: 15
Yea thats the one. I have a default index module. As originally i kept getting a directory listing for the website
 
  


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
ASP w/ Apache2 on Ubuntu 8.10 fackamato Linux - Server 3 03-05-2009 09:00 AM
Help setting up apache2 on ubuntu joe2748 Linux - Server 3 02-04-2008 06:51 PM
Apache2 server on Ubuntu nw504 Linux - Server 2 02-17-2007 05:09 AM
Apache2, MySQL & PHP Web Server. FTP Needed! Bobson Linux - Networking 4 02-07-2005 04:25 PM
Apache2 + SuSE 9.1 + FTP = how to config? spankmeister7 Linux - Software 0 07-25-2004 06:46 PM

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

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