Link to home
Start Free TrialLog in
Avatar of thomasbonham
thomasbonhamFlag for United States of America

asked on

Allowing Directory Index

I'm trying to allow Directory Indexing in my /var/www/cgi-bin/ so when someone goes to my site example.com/cgi-bin index.cgi will come up without having to type it.

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of prunckle
prunckle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Create an .htaccess file in your main directory (/var/www/html) or a subdirectory of your choice.  This file will control settings for the directory it is placed in , plus all subdirectories below it unless they have .htaccess files of their own.

Add this line to that file:

Options +Indexes

Avatar of jcullins
jcullins

if you are running apache2 then you can check your /etc/apache/httpd.conf file for the following line

<IfModule dir_module>
   DirectoryIndex index.html index.htm
</IfModule>

Adding index.cgi behind the index.htm should cause apache to look for index.html if it doesn't find it, then it will look for index.htm, then if it doesn't find that, it will look for index.cgi ...

Hopefully that is what you are looking for.

Thanks
jcullins is almost there. Just add the index.cgi at the end of list of those insexes - restart apache.