basic html question - download link to files on my webpage question
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
basic html question - download link to files on my webpage question
Hi,
I have a small LAMP server, used mostly for family and friends. The web pages are very basic (built with Kompozer). I have thumbnails that link to pictures and files.
But i can not find a way to make the full content of a directory downloadable, except by making html link to each of the files, one by one. This task would take too long, is there a way to do this automaticaly for all the files in a folder. I have a script that make a html list of the content of each of my var/www/html/my_stuff_directory, it would be nice if every line of that list would be clickable and point to the actual file.
Thank you in advance for your help.
The short answer would be to use apache's mod-autoindex, which does just what you want - if there's not an index.<whatever> in a directory, it'll just produce a list of the files there.
If the module's not enabled, do "a2enmod autoindex" as root/sudo and restart your apache. You can also fine-tune it by allowing (or not) auto-indexing on specific folders in your web site.
my problem is that i probably configure it wrong, see what i added to httpd.conf
Code:
<Directory "/var/www/html/stuff">
Options -Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
I restarted the server and still no indexing is found in there.
If i create a index.html file in that repertory, it stays empty and if i don't create one, it is simply not being created.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.