![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Auto copy for files from folder to folder upon instant writing | Bashar | UNIX for Advanced & Expert Users | 2 | 08-21-2008 11:44 AM |
| How to display contents of folder when 'cd' is used | mumashankar | UNIX for Dummies Questions & Answers | 3 | 03-06-2008 04:42 PM |
| Parse the .txt file for folder name and FTP to the corrsponding folder. | MeganP | Shell Programming and Scripting | 3 | 07-03-2007 10:54 AM |
| Take a folder name and find it in another folder (Complicated) | hkhan12 | Shell Programming and Scripting | 5 | 09-06-2006 09:25 AM |
| copy folder contents | robsk8_99 | UNIX for Dummies Questions & Answers | 1 | 02-22-2005 03:54 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Folder Contents
Hi,
I'm trying to allow people to access the contents of a folder on a web site, I am automatically placing files in this folder for people to download. I'm using Apache on Mac OS X, if that makes a difference. Can anyone help with this? I've found no documentation on this so far... Thanks! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You just want to be able to let people view the files like they would in windows explorer?
You may have to adjust some security settings in apache, but try creating a folder in your website but don't place an html file in there that would load by default, such as index.html (or index.htm, default.html, etc - there should be a place in apache that lists all such files that apache will search for to load as a default page). I think if apache can't find any files in that list to load as a default page, then it will create a listing of all the files in the directory. |
|
#3
|
|||
|
|||
|
Hi, thanks for the response!
Yes, I do want a file listing as you've stated. All I want to do is put TAB separated files in this folder and allow users to download by selecting them.I've already tried having a folder without HTML files, but simply get this error: Forbidden You don't have permission to access /reports/test/ on this server. So, I presume I need to allow users to 'view folder contents' somehow... |
|
#4
|
|||
|
|||
|
I don't know what you mean by TAB separated files. However, if you are satisfied with automatic directory listing that you see on typical Apache servers, then you have to check several things:
1) The directory config allows file listing. In httpd.conf make sure the concerned directory has "Indexes" in "Options". You may need to explicitly add a section to the config file to override the default, which is a very restrictive one. e.g. try <Directory "/reports/test"> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> 2) The directory has a chmod of 755 (don't know if MacOS needs this?) |
|
#5
|
|||
|
|||
|
Hi, and thanks!
This worked perfectly. It's made me feel a little adventurous - is it possible to change the default file listing to reverse alphabetical order? I want to put some files on which I'll name by date, (yyyymmdd_filename.xxx) but want it to pick up the most recent first. I know users can just click the headers at the top to sort, I was just wondering if it's possible. The files I'm putting on were tab separated exports from a database, but it just 'shows' them in the browser when saved as .tab - so I'm saving them as .xls (excel) so they are downloaded when clicked. My understanding is that Mac OSX is effectively like a pretty GUI for UNIX, but commands like chmod are definitely relevant, there's only so much you can do without 'getting dirty' with the terminal. Also, I've found the front-end to be a little confusing. Thanks again. |
|
#6
|
|||
|
|||
|
About the directory listing, Apache has very little configuration to influence how the listing looks like. Fortunately, the IndexOrderDefault directive seems to do what you want.
For more configuration options, see also the IndexOptions directive. If you are not using 2.x, check the documentation of your version to see if these directives are applicable for your version. I don't know much about MacOS (especially OS X). From your description and some little pre-OS X adventure I believe OS X is indeed a pretty form of Unix. |
|
#7
|
|||
|
|||
|
It is Apache 2, that IndexOrderDefault looks good to me! Thanks for that.
I'm almost certain OS X will only run on a Mac. I've asked people about this and it seems to be the general consensus. I've found OS X to be more robust than previous Mac OS, and as it now embraces UNIX, it means I get some experience there. |
|||
| Google The UNIX and Linux Forums |