As you hopefully know apache2 will give you a filebrowser that looks terrible if it cant find an index page (index.html, index.php, or whatever you set it as). This is useful for filesharing, but just looks terrible. The default sorting order is terrible to. We are going to fix all that with prettier icons, and better sorting.

Cool thing too, is the Fancyindexing/file browser feature of apache is read only so noone on the web can edit your stuff. Its also secure. By the way the other alternative to this is making your own php code that will let you browse safely.

Using this:
https://gist.github.com/shamangeorge/6062991

But also check this out:
http://uksysadmin.wordpress.com/2010/11/09/apache-fancyindexing-and-php-5-mod_autoindex/

For indepth info on all of the options we will be using: http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html

Going to go from this:

To this:

I would usually find out why this is happening, but I dont mind it, looks good and also I dont have the time right now, maybe another day.

Steps

So my default config file looks like this, before any edits:

1st Step.

Make a file called /etc/apache2/fancyedits.conf

In that file put this (replace /var/www with the location you want to fancyindex):

NOTE: this will affect everything from /var/www down recursively into it, it will not affect pages that it found an index page on such as index.html, index.php, etc…

NOTE: notice that images are grabbed from fruitopology. We can download all of them, and point them locally.
For example if your picture http://cdn.fruitopology.net/img/icons/type_application.png was here /var/www/index-icons/type_application.png, you could then just say AddIcon /index-icons/type_application.png , all directory names in apache are either absolute from root of the filesystem / or relative from /etc/apache2 or relative from your Directory which in this case is /var/www. For example Directory /var/www is absolute. But these AddIcons and IndexStyleSheet and HeaderName and ReadmeName and FooterName (not included in this example) are relative locations from /var/www so when you see /index-icons/ is actually /var/www/index-icons/. In bonus section I will show you how to download all these pngs and css files into the /var/www/index-icons/ folder. I will also provide with a download link of the files.

## FILENAME: /etc/apache2/fancyedits.conf
<Directory /var/www>
        Options +FollowSymlinks +Multiviews +Indexes
        AllowOverride All
        ## FANCY INDEX Directories ##
        IndexOptions +FancyIndexing
        IndexOptions +VersionSort
        IndexOptions +HTMLTable
        IndexOptions +FoldersFirst
        IndexOptions +IconsAreLinks
        IndexOptions +IgnoreCase
        IndexOptions +SuppressDescription
        IndexOptions +SuppressHTMLPreamble
        IndexOptions +XHTML
        IndexOptions +IconWidth=16
        IndexOptions +IconHeight=16
        IndexOptions +NameWidth=*
        IndexOptions +DescriptionWidth=200
        IndexOptions +Charset=UTF-8
        IndexOrderDefault Descending Name


        # /include is an aliased directory
        # with the content of the header and footer
        # and optionally with the icons as well
        # here we use an external CDN to fetch imgs
        HeaderName /include/HEADER.html
        ReadmeName /include/FOOTER.html
        IndexStyleSheet http://cdn.fruitopology.net/css/main.css
        AddIcon http://cdn.fruitopology.net/img/icons/type_application.png .exe .app .EXE .APP
        AddIcon http://cdn.fruitopology.net/img/icons/type_binary.png .bin .hqx .uu .BIN .HQX .UU
        AddIcon http://cdn.fruitopology.net/img/icons/type_box.png .tar .tgz .tbz .tbz2 bundle .rar .TAR .TGZ .TBZ .TBZ2
        AddIcon http://cdn.fruitopology.net/img/icons/type_rar.png .rar .RAR
        AddIcon http://cdn.fruitopology.net/img/icons/type_html.png .htm .html .HTM .HTML
        AddIcon http://cdn.fruitopology.net/img/icons/type_code.png .htx .htmls .dhtml .phtml .shtml .inc .ssi .c .cc .css .h .rb .js .rb .pl .py .sh .shar .csh .ksh .tcl .as
        AddIcon http://cdn.fruitopology.net/img/icons/type_database.png .db .sqlite
        AddIcon http://cdn.fruitopology.net/img/icons/type_disc.png .iso .image
        AddIcon http://cdn.fruitopology.net/img/icons/type_document.png .ttf
        AddIcon http://cdn.fruitopology.net/img/icons/type_excel.png .xlsx .xls .xlm .xlt .xla .xlb .xld .xlk .xll .xlv .xlw
        AddIcon http://cdn.fruitopology.net/img/icons/type_flash.png .flv
        AddIcon http://cdn.fruitopology.net/img/icons/type_illustrator.png .ai .eps .epsf .epsi
        AddIcon http://cdn.fruitopology.net/img/icons/type_pdf.png .pdf
        AddIcon http://cdn.fruitopology.net/img/icons/type_php.png .php .phps .php5 .php3 .php4 .phtm
        AddIcon http://cdn.fruitopology.net/img/icons/type_photoshop.png .psd
        AddIcon http://cdn.fruitopology.net/img/icons/type_monitor.png .ps
        AddIcon http://cdn.fruitopology.net/img/icons/type_powerpoint.png .ppt .pptx .ppz .pot .pwz .ppa .pps .pow
        AddIcon http://cdn.fruitopology.net/img/icons/type_swf.png .swf
        AddIcon http://cdn.fruitopology.net/img/icons/type_text.png .tex .dvi
        AddIcon http://cdn.fruitopology.net/img/icons/type_vcf.png .vcf .vcard
        AddIcon http://cdn.fruitopology.net/img/icons/type_word.png .doc .docx
        AddIcon http://cdn.fruitopology.net/img/icons/type_zip.png .Z .z .tgz .gz .zip
        AddIcon http://cdn.fruitopology.net/img/icons/type_globe.png .wrl .wrl.gz .vrm .vrml .iv
        AddIcon http://cdn.fruitopology.net/img/icons/type_android.gif .apk .APK
        AddIconByType (TXT,http://cdn.fruitopology.net/img/icons/type_text.png) text/*
        AddIconByType (IMG,http://cdn.fruitopology.net/img/icons/type_image.png) image/*
        AddIconByType (SND,http://cdn.fruitopology.net/img/icons/type_audio.png) audio/*
        AddIconByType (VID,http://cdn.fruitopology.net/img/icons/type_video.png) video/*
        AddIconByEncoding (CMP,http://cdn.fruitopology.net/img/icons/type_box.png) x-compress x-gzip
        AddIcon http://cdn.fruitopology.net/img/icons/back.png ..
        AddIcon http://cdn.fruitopology.net/img/icons/information.png README INSTALL
        AddIcon http://cdn.fruitopology.net/img/icons/type_folder.png ^^DIRECTORY^^
        AddIcon http://cdn.fruitopology.net/img/icons/blank.png ^^BLANKICON^^

        DefaultIcon http://cdn.fruitopology.net/img/icons/type_document.png
        Order deny,allow
        Allow from all
</Directory>

 Note: its fine if your missing some files like the HEADER.html and the FOOTER.html file. It will still load. By default those dont exist so its fine that they dont exist, they are optional

DefaultIcon http://cdn.fruitopology.net/img/icons/type_document.png
Order deny,allow
Allow from all
</Directory>

More info on HEADER and FOOTER file and where they go in the BONUS material below

2nd Step.

Add in the Include statements to your already working VirtualHost configs. Ill show you the before and after

Here is my Virtual Host config for HTTP (port 50132 instead of 80 for me, I wanted to be hidden) – ill show one for HTTPS (port 443) after this

We are just adding this line to the bottom of the virtual host section:

Include fancyedits.conf

Before fancyedits was added in (the original file):

<VirtualHost *:50132>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/secure>
DAV On
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Now add the line, to the bottom of the very virtualhost section.

Include fancyedits.conf

After the edit (I just added the “Include …” line at the bottom):

<VirtualHost *:50132>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/secure>
DAV On
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
# ADDED BY KOSSBOSS - making indexing look better
Include fancyedits.conf
</VirtualHost>

Also add a comment if you wish

Here is the final HTTPS one (not doing before and after with this as its big):

<IfModule mod_ssl.c>
<VirtualHost 0.0.0.0:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/usethis.crt
SSLCertificateKeyFile /etc/ssl/usethis.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
# ADDED BY KOSSBOSS - making fancy indexing look better
Include fancyedits.conf
</VirtualHost>
</IfModule>

Now save and exit. If your running both http and https like myself, make sure to edit both default and default-ssl.

3rd step.

Confirm the configs are good:

apache2ctl configtest
apache2ctl restart

NOTE: can also do the above with the “service” command or directly with the /etc/init.d/apache2 file or with systemctl (if your using systemd)

BONUS MATERIAL SECTION

This is where you will find variations to the above method. More information and also extra topic on robot.txt and how you can use it to stop search engines from snooping your stuff.

BONUS: If you want to set it up with .htaccess instead of include file.

So if you dont want to use include files. Then skip step1,2 and 3. And just make the following file
/var/www/.htaccess
Im assuming here that your web dir is /var/www

NOTE: all this can also be done with a .htaccess file. Simply put this in the .htaccess file:

## FILENAME: /var/www/.htaccess
## COMMENT FOR HTACCESS: Options +FollowSymlinks +Multiviews +Indexes
## COMMENT FOR HTACCESS: AllowOverride All
## FANCY INDEX Directories ##
IndexOptions +FancyIndexing
IndexOptions +VersionSort
IndexOptions +HTMLTable
IndexOptions +FoldersFirst
IndexOptions +IconsAreLinks
IndexOptions +IgnoreCase
IndexOptions +SuppressDescription
IndexOptions +SuppressHTMLPreamble
IndexOptions +XHTML
IndexOptions +IconWidth=16
IndexOptions +IconHeight=16
IndexOptions +NameWidth=*
IndexOptions +DescriptionWidth=200
IndexOptions +Charset=UTF-8
IndexOrderDefault Descending Name
# /include is an aliased directory
# with the content of the header and footer
# and optionally with the icons as well
# here we use an external CDN to fetch imgs
HeaderName /include/tmp_listing_header.html
ReadmeName /include/footer_listing.html
IndexStyleSheet http://cdn.fruitopology.net/css/main.css
AddIcon http://cdn.fruitopology.net/img/icons/type_application.png .exe .app .EXE .APP
AddIcon http://cdn.fruitopology.net/img/icons/type_binary.png .bin .hqx .uu .BIN .HQX .UU
AddIcon http://cdn.fruitopology.net/img/icons/type_box.png .tar .tgz .tbz .tbz2 bundle .rar .TAR .TGZ .TBZ .TBZ2
AddIcon http://cdn.fruitopology.net/img/icons/type_rar.png .rar .RAR
AddIcon http://cdn.fruitopology.net/img/icons/type_html.png .htm .html .HTM .HTML
AddIcon http://cdn.fruitopology.net/img/icons/type_code.png .htx .htmls .dhtml .phtml .shtml .inc .ssi .c .cc .css .h .rb .js .rb .pl .py .sh .shar .csh .ksh .tcl .as
AddIcon http://cdn.fruitopology.net/img/icons/type_database.png .db .sqlite
AddIcon http://cdn.fruitopology.net/img/icons/type_disc.png .iso .image
AddIcon http://cdn.fruitopology.net/img/icons/type_document.png .ttf
AddIcon http://cdn.fruitopology.net/img/icons/type_excel.png .xlsx .xls .xlm .xlt .xla .xlb .xld .xlk .xll .xlv .xlw
AddIcon http://cdn.fruitopology.net/img/icons/type_flash.png .flv
AddIcon http://cdn.fruitopology.net/img/icons/type_illustrator.png .ai .eps .epsf .epsi
AddIcon http://cdn.fruitopology.net/img/icons/type_pdf.png .pdf
AddIcon http://cdn.fruitopology.net/img/icons/type_php.png .php .phps .php5 .php3 .php4 .phtm
AddIcon http://cdn.fruitopology.net/img/icons/type_photoshop.png .psd
AddIcon http://cdn.fruitopology.net/img/icons/type_monitor.png .ps
AddIcon http://cdn.fruitopology.net/img/icons/type_powerpoint.png .ppt .pptx .ppz .pot .pwz .ppa .pps .pow
AddIcon http://cdn.fruitopology.net/img/icons/type_swf.png .swf
AddIcon http://cdn.fruitopology.net/img/icons/type_text.png .tex .dvi
AddIcon http://cdn.fruitopology.net/img/icons/type_vcf.png .vcf .vcard
AddIcon http://cdn.fruitopology.net/img/icons/type_word.png .doc .docx
AddIcon http://cdn.fruitopology.net/img/icons/type_zip.png .Z .z .tgz .gz .zip
AddIcon http://cdn.fruitopology.net/img/icons/type_globe.png .wrl .wrl.gz .vrm .vrml .iv
AddIcon http://cdn.fruitopology.net/img/icons/type_android.gif .apk .APK
AddIconByType (TXT,http://cdn.fruitopology.net/img/icons/type_text.png) text/*
AddIconByType (IMG,http://cdn.fruitopology.net/img/icons/type_image.png) image/*
AddIconByType (SND,http://cdn.fruitopology.net/img/icons/type_audio.png) audio/*
AddIconByType (VID,http://cdn.fruitopology.net/img/icons/type_video.png) video/*
AddIconByEncoding (CMP,http://cdn.fruitopology.net/img/icons/type_box.png) x-compress x-gzip
AddIcon http://cdn.fruitopology.net/img/icons/back.png ..
AddIcon http://cdn.fruitopology.net/img/icons/information.png README INSTALL
AddIcon http://cdn.fruitopology.net/img/icons/type_folder.png ^^DIRECTORY^^
AddIcon http://cdn.fruitopology.net/img/icons/blank.png ^^BLANKICON^^
DefaultIcon http://cdn.fruitopology.net/img/icons/type_document.png
## COMMENT FOR HTACCESS: Order deny,allow
## COMMENT FOR HTACCESS: Allow from all

BONUS: downloading all of the icons and css files

Here is all of the files that are being downloaded from fruitopology:

http://cdn.fruitopology.net/css/main.css
http://cdn.fruitopology.net/img/icons/back.png
http://cdn.fruitopology.net/img/icons/blank.png
http://cdn.fruitopology.net/img/icons/information.png
http://cdn.fruitopology.net/img/icons/type_android.gif
http://cdn.fruitopology.net/img/icons/type_application.png
http://cdn.fruitopology.net/img/icons/type_audio.png
http://cdn.fruitopology.net/img/icons/type_binary.png
http://cdn.fruitopology.net/img/icons/type_box.png
http://cdn.fruitopology.net/img/icons/type_code.png
http://cdn.fruitopology.net/img/icons/type_database.png
http://cdn.fruitopology.net/img/icons/type_disc.png
http://cdn.fruitopology.net/img/icons/type_document.png
http://cdn.fruitopology.net/img/icons/type_excel.png
http://cdn.fruitopology.net/img/icons/type_flash.png
http://cdn.fruitopology.net/img/icons/type_folder.png
http://cdn.fruitopology.net/img/icons/type_globe.png
http://cdn.fruitopology.net/img/icons/type_html.png
http://cdn.fruitopology.net/img/icons/type_illustrator.png
http://cdn.fruitopology.net/img/icons/type_image.png
http://cdn.fruitopology.net/img/icons/type_monitor.png
http://cdn.fruitopology.net/img/icons/type_pdf.png
http://cdn.fruitopology.net/img/icons/type_photoshop.png
http://cdn.fruitopology.net/img/icons/type_php.png
http://cdn.fruitopology.net/img/icons/type_powerpoint.png
http://cdn.fruitopology.net/img/icons/type_rar.png
http://cdn.fruitopology.net/img/icons/type_swf.png
http://cdn.fruitopology.net/img/icons/type_text.png
http://cdn.fruitopology.net/img/icons/type_vcf.png
http://cdn.fruitopology.net/img/icons/type_video.png
http://cdn.fruitopology.net/img/icons/type_word.png
http://cdn.fruitopology.net/img/icons/type_zip.png

You can download them all with wget.

Make a file called /etc/apache2/frtlist.txt with the above content (the list of links)

wget -i /etc/apache2/frtlist.txt -P /var/www/index-icons
# or relative use works as well
cd /var/www/
wget -i /etc/apache2/frtlist.txt -P index-icons

That will download all of the links (pictures and css) to /var/www/index-icons/

Or just download them from here:

http://www.infotinks.com/wp-content/uploads/2014/12/index-icons-fruitopology.tgz

Download with wget and extract like so if you want:

cd /var/www
mkdir index-icons
wget http://www.infotinks.com/wp-content/uploads/2014/12/index-icons-fruitopology.tgz
tar xf index-icons-fruitopology.tgz<span style="font-family: Lato, sans-serif; font-size: 16.3636360168457px; line-height: 1.5; background-color: #ffffff;"> </span>

Here is the config file for fancyedits.conf if your pics and css are in /var/www/index-icons/ folder:

<Directory /var/www>
        Options +FollowSymlinks +Multiviews +Indexes
        AllowOverride All
        ## FANCY INDEX Directories ##
        IndexOptions +FancyIndexing
        IndexOptions +VersionSort
        IndexOptions +HTMLTable
        IndexOptions +FoldersFirst
        IndexOptions +IconsAreLinks
        IndexOptions +IgnoreCase
        IndexOptions +SuppressDescription
        IndexOptions +SuppressHTMLPreamble
        IndexOptions +XHTML
        IndexOptions +IconWidth=16
        IndexOptions +IconHeight=16
        IndexOptions +NameWidth=*
        IndexOptions +DescriptionWidth=200
        IndexOptions +Charset=UTF-8
        IndexOrderDefault Descending Name

        # /include is an aliased directory
        # with the content of the header and footer
        # and optionally with the icons as well
        # here we use an external CDN to fetch imgs
	HeaderName /index-icons/HEADER.html
	ReadmeName /index-icons/FOOTER.html
        IndexStyleSheet /index-icons/main.css
        AddIcon /index-icons/type_application.png .exe .app .EXE .APP
        AddIcon /index-icons/type_binary.png .bin .hqx .uu .BIN .HQX .UU
        AddIcon /index-icons/type_box.png .tar .tgz .tbz .tbz2 bundle .rar .TAR .TGZ .TBZ .TBZ2
        AddIcon /index-icons/type_rar.png .rar .RAR
        AddIcon /index-icons/type_html.png .htm .html .HTM .HTML
        AddIcon /index-icons/type_code.png .htx .htmls .dhtml .phtml .shtml .inc .ssi .c .cc .css .h .rb .js .rb .pl .py .sh .shar .csh .ksh .tcl .as
        AddIcon /index-icons/type_database.png .db .sqlite
        AddIcon /index-icons/type_disc.png .iso .image
        AddIcon /index-icons/type_document.png .ttf
        AddIcon /index-icons/type_excel.png .xlsx .xls .xlm .xlt .xla .xlb .xld .xlk .xll .xlv .xlw
        AddIcon /index-icons/type_flash.png .flv
        AddIcon /index-icons/type_illustrator.png .ai .eps .epsf .epsi
        AddIcon /index-icons/type_pdf.png .pdf
        AddIcon /index-icons/type_php.png .php .phps .php5 .php3 .php4 .phtm
        AddIcon /index-icons/type_photoshop.png .psd
        AddIcon /index-icons/type_monitor.png .ps
        AddIcon /index-icons/type_powerpoint.png .ppt .pptx .ppz .pot .pwz .ppa .pps .pow
        AddIcon /index-icons/type_swf.png .swf
        AddIcon /index-icons/type_text.png .tex .dvi
        AddIcon /index-icons/type_vcf.png .vcf .vcard
        AddIcon /index-icons/type_word.png .doc .docx
        AddIcon /index-icons/type_zip.png .Z .z .tgz .gz .zip
        AddIcon /index-icons/type_globe.png .wrl .wrl.gz .vrm .vrml .iv
        AddIcon /index-icons/type_android.gif .apk .APK
        AddIconByType (TXT,/frt/type_text.png) text/*
        AddIconByType (IMG,/frt/type_image.png) image/*
        AddIconByType (SND,/frt/type_audio.png) audio/*
        AddIconByType (VID,/frt/type_video.png) video/*
        AddIconByEncoding (CMP,/frt/type_box.png) x-compress x-gzip
        AddIcon /frt/back.png ..
        AddIcon /frt/information.png README INSTALL
        AddIcon /frt/type_folder.png ^^DIRECTORY^^
        AddIcon /frt/blank.png ^^BLANKICON^^

        DefaultIcon /frt/type_document.png
        Order deny,allow
        Allow from all
</Directory>

Here is the config file for htaccess if your pics and css are in /var/www/index-icons/ folder:

## filename: /var/www/.htaccess
## COMMENT FOR HTACCESS: <Directory /var/www>
## COMMENT FOR HTACCESS: Options +FollowSymlinks +Multiviews +Indexes
## COMMENT FOR HTACCESS: AllowOverride All
## FANCY INDEX Directories ##
IndexOptions +FancyIndexing
IndexOptions +VersionSort
IndexOptions +HTMLTable
IndexOptions +FoldersFirst
IndexOptions +IconsAreLinks
IndexOptions +IgnoreCase
IndexOptions +SuppressDescription
IndexOptions +SuppressHTMLPreamble
IndexOptions +XHTML
IndexOptions +IconWidth=16
IndexOptions +IconHeight=16
IndexOptions +NameWidth=*
IndexOptions +DescriptionWidth=200
IndexOptions +Charset=UTF-8
IndexOrderDefault Descending Name
# /include is an aliased directory
# with the content of the header and footer
# and optionally with the icons as well
# here we use an external CDN to fetch imgs
HeaderName /frt/HEADER.html
ReadmeName /frt/FOOTER.html
IndexStyleSheet /frt/main.css
AddIcon /frt/type_application.png .exe .app .EXE .APP
AddIcon /frt/type_binary.png .bin .hqx .uu .BIN .HQX .UU
AddIcon /frt/type_box.png .tar .tgz .tbz .tbz2 bundle .rar .TAR .TGZ .TBZ .TBZ2
AddIcon /frt/type_rar.png .rar .RAR
AddIcon /frt/type_html.png .htm .html .HTM .HTML
AddIcon /frt/type_code.png .htx .htmls .dhtml .phtml .shtml .inc .ssi .c .cc .css .h .rb .js .rb .pl .py .sh .shar .csh .ksh .tcl .as
AddIcon /frt/type_database.png .db .sqlite
AddIcon /frt/type_disc.png .iso .image
AddIcon /frt/type_document.png .ttf
AddIcon /frt/type_excel.png .xlsx .xls .xlm .xlt .xla .xlb .xld .xlk .xll .xlv .xlw
AddIcon /frt/type_flash.png .flv
AddIcon /frt/type_illustrator.png .ai .eps .epsf .epsi
AddIcon /frt/type_pdf.png .pdf
AddIcon /frt/type_php.png .php .phps .php5 .php3 .php4 .phtm
AddIcon /frt/type_photoshop.png .psd
AddIcon /frt/type_monitor.png .ps
AddIcon /frt/type_powerpoint.png .ppt .pptx .ppz .pot .pwz .ppa .pps .pow
AddIcon /index-icons/type_swf.png .swf
AddIcon /index-icons/type_text.png .tex .dvi
AddIcon /index-icons/type_vcf.png .vcf .vcard
AddIcon /index-icons/type_word.png .doc .docx
AddIcon /index-icons/type_zip.png .Z .z .tgz .gz .zip
AddIcon /index-icons/type_globe.png .wrl .wrl.gz .vrm .vrml .iv
AddIcon /index-icons/type_android.gif .apk .APK
AddIconByType (TXT,/index-icons/type_text.png) text/*
AddIconByType (IMG,/index-icons/type_image.png) image/*
AddIconByType (SND,/index-icons/type_audio.png) audio/*
AddIconByType (VID,/index-icons/type_video.png) video/*
AddIconByEncoding (CMP,/index-icons/type_box.png) x-compress x-gzip
AddIcon /index-icons/back.png ..
AddIcon /index-icons/information.png README INSTALL
AddIcon /index-icons/type_folder.png ^^DIRECTORY^^
AddIcon /index-icons/blank.png ^^BLANKICON^^

BONUS: Using the footer and header file to give more info (also make the background white instead of black)

you can also give more information to your files via /var/www/index-icons/HEADER.html and /var/www/index-icons/FOOTER.html (you have to create these files)

Ya I know its called index-icons and we are putting html and css files… who cares its just a folder name.

Because of these 2 lines in the fancyedits file:

HeaderName /include/HEADER.html
ReadmeName /include/FOOTER.html

Play around with what you want in the html of those 2 files. Start off with just text like “test-header” in header file and “test-foorter” in footer file.

cd /var/www/index-icons
echo "footer-test" > FOOTER.html
echo "header-test" > HEADER.html

The Header looks like this:

The Footer looks like this:

Notice how adding HEADER and FOOTER html, changed it from black background to white. Keep that in mind. It has to do with CSS files. Probably need to add it in to the HEADER and FOOTER if I want the black background back.

BONUS: robots file – Stop SearchEngines from Looking thru your files

dont want search engines looking thru your stuff and indexing your files and folders for people to randomly come across:

Add this robots.txt file on the root your indexing page
So for me my browsing starts here /var/www

So make this file /var/www/robots.txt
With this content:

User-agent: *
Disallow: /

NOTE ABOUT FILE PERMISSIONS: The key is to make sure that apache user or group has at least read access to the files. My robots file has 777 across the board. Its not like anyone can edit it via the Indexing program (its a read only thing)

One thought on “How make apache file browser / indexing prettier – also called FancyIndexing – BONUS – robots stopping search engines

Leave a Reply

Your email address will not be published. Required fields are marked *