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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-11-2009, 08:58 PM
|
#1
|
Member
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96
Rep:
|
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
|
|
|
06-12-2009, 12:13 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,230
|
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.
|
|
|
06-12-2009, 12:14 AM
|
#3
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
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.
|
|
|
06-14-2009, 07:22 PM
|
#4
|
Member
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96
Original Poster
Rep:
|
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
|
|
|
06-15-2009, 12:31 AM
|
#5
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,230
|
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.
|
|
|
06-15-2009, 11:56 PM
|
#6
|
Member
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96
Original Poster
Rep:
|
Yea thats the one. I have a default index module. As originally i kept getting a directory listing for the website
|
|
|
All times are GMT -5. The time now is 01:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|