quick apache question
- Started
- Last post
- 8 Responses
- skel
on my server i get a 403 if someone goes to a dir without an index.htm
whats the setting to make a directory display its contents even without an index.htm?
- ilmarine0
you have to edit the appache conf file. i don't remember the exact line but do a search for directory or something suchlike.
- xau0
http://httpd.apache.org/docs-pro…
you have to have r00t privelages to make the changes. Your hosting provider may not want your server to display contents as that is a security risk, fo' shizzle.
- skel0
i dug around the docs a bit but i'm not sure what i'm looking for... this is for my own machine i'm hosting Apache locally
- skel0
arg this takes way too long to research for something that's gonna be one line of code
- ribit0
you can use a .htaccess file in any directory to override the server conf file (you don't need to be root)
Put this in the '.htaccess' file to allow indexing:
Options +Indexesand add this to set custom error pages:
ErrorDocument 404 your404page.html
ErrorDocument 403 your403page.html
etc
- skel0
but what if i wanted it to just diplay the folder's contents, which is too large for me to make an .htm with tons of links?
- sparker0
all you need to know...
- ribit0
Thats what 'Options +Indexes' does... enables display of the directory contents.