• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux apache server problem/question

danzigrules

Golden Member
this might not be the right forum, if so I am sorry


A friend of mine has a website running on a linux apache server. He's been trying to find out how to make it so that users can see the
contents of a directory. A directory on his site has some .jpg files in it and he wants the list of all files in that directory to come up automatically when users go to www.domain.com/directory/ . Does anyone know how to do this with a linux apache server?
My friend thinks that perhaps it is done with a .htaccess file, but he's not sure. He's been trying to do searches and crap but hasn't found what he's looking for. Any help and info would be much appreciated! Thx ahead of time 🙂
 
again posting for a friend ;p


well, by default, all directories without index/default files in them do NOT list contents to users. They return a FORBIDDEN, no access, error to the user

Forbidden

You don't have permission to access /lanstrike/ on this server.



My friend also said that he's sure the CHMOD is set to the correct permissions, 755
 
Is this his own machine or on a webhost?

He can put this in an .htaccess:

Options +Indexes

Although I just ripped that from google and am not sure if it will work. As a last resort, if the webhost is not allowing it, he can always just get a php script or something like that which does a directory listing.

If it's his own server, then he can go into httpd.conf, and go to the <Directory [webroot]> section and add +Indexes to the options line.
 
Back
Top