Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying directory indexes on Linux servers

Status
Not open for further replies.
Oct 30, 2003
10
GB
Up till know, I've only ever run an Apache web server, but now I've been released into the big wide world, I find myself with access to a Linux server.

On one of the directories here, I wish to enable "directory index" viewing, ie, an "index of" page as opposed to a 403 error.

Can anyone explain how I'd do this please?

Many thanks,
tKF
 
Did you mean you want apache to give you a fancy listing of files/directories when browsing a directory which doesn't have a index.html inside it, rather than return you a 403 forbidden error? Just add "Indexes" after "Options" in the httpd.conf file and then restart apache.

e.g.
<Directory &quot;/opt/server/httpd&quot;>
Options Indexes ... (other options skipped)
... (other lines skipped)
</Directory>
 
You may not want to have Directory Indexing enabled for all directories in your site(s) for security purposes. If you are not wanting it enabled for all directories, then you can simply create a .htaccess file in the directories you want Directory Indexing enabled with the directive &quot;DirectoryIndex *&quot; inside the file. That should do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top