enable FancyIndexing on Apache v2.x

IndexOptions

IndexOptions controls the appearance of server generated directing listings, by adding icons, file descriptions, and so on. If Options Indexes is set, the Web server generates a directory listing when the Web server receives an HTTP request for a directory without an index.

First, the Web server looks in the requested directory for a file matching the names isted in the DirectoryIndex directive (usually, index.html ). If an index.html file is not found, Apache HTTP Server creates an HTML directory listing of the requested directory. The appearance of this directory listing is controlled, in part, by the IndexOptions directive…

 

FancyIndexing

This means that a user can re-sort a directory listing by clicking on column headers. Another click on the same header will switch from ascending to descending order. FancyIndexing also shows different icons for different files, based upon file extensions.

The default configuration on a cPanel powered server turns off FancyIndexing. To enable this feature, do the following:

Makse sure the file httpd-autoindex.conf exists in /etc/httpd/conf/extra directory

Add the following directives to your /etc/httpd/conf/httpd.conf file:

<IfModule mod_autoindex.c>
IndexOptions FancyIndexing IconHeight=16 IconWidth=16
</ifModule>
Run this command to restart httpd:

/scripts/restartsrv httpd

  • 462 Χρήστες που βρήκαν το παρόν κατατοπιστικό
Η απάντηση ήταν κατατοπιστική?

Σχετικά άρθρα

Optimize apache web server

Apache 2.x is a webserver, designed to provide a balance of flexibility, portability, and...