Skip to content

kriskoribsky/localhost-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localhost index

This project is continuation of an original single-file project. (see other branches)
It takes use of Apache's mod_autoindex module, which creates index of directory file listings,
but instead of using default generated index page, it loads its own custom icons, html & styles.

Description

This project could be utilized by web developers developing in local environment 'localhost' to improve default indexing.

Features

  • Eye-compelling minimalist design, good-looking on mobile devices too
  • Search bar for finding files inside your directory
  • Custom icons for all major file extensions (e.g. .js, .php, .css, .html)
  • Display of current system path
  • Handy open in explorer button
  • Sort files according to file-size, name or edit date
  • Random motivational quotes

Default localhost index

localhost index with FancyIndexing


new style of localhost index

Setup

Be sure to check:

  • Which directory your Apache web server loads, you can do that by checking DocumentRoot directive,
    located inside Apache's main httpd.conf configuration file.
  • Important! In order for mod_autoindex to work, FollowSymLinks option overriding must be enabled:
    • This is done via the AllowOverride All, or at least AllowOverride Options=FollowSymLinks option.
    • Example of a httpd.conf file:
      • DocumentRoot "D:/Programovanie/web/stranky"
        <Directory "D:/Programovanie/web/stranky">
        
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride Options=FollowSymLinks
        
            Require all granted
        </Directory>
        
  • When making changes to httpd.conf file, you should restart Apache sudo apachectl restart.

After that:

  1. Clone or download the files.
  2. Add them to your DocumentRoot directory.
  3. Copy the .htaccess file up one directory.

Finally, your DocumentRoot directory should look like this:

DocumentRoot directory containing .htaccess & localhost-index files

Customization

Pretty much all the options are located inside .htaccess file:

  • If you want to hide some files or directories, there is a IndexIngore directive.
  • You can turn off file sorting with SuppressColumnSorting option in IndexOptions directive.
  • There is also a possibility to remove default FoldersFirst option to mix files and directories.

You can find more information about these options on autoindex - indexoptions doc page

Credits & inspiration

Documentation

About

Apache autoindex page utilized for local web development. I developed this tool back when I was starting in webdev with XAMPP stack on Windows.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published