The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable FancyIndexing but keep Indexes off by default

Discussion in 'EasyApache' started by ottdev, Feb 20, 2016.

  1. ottdev

    ottdev Well-Known Member

    Joined:
    Oct 1, 2013
    Messages:
    63
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    What is the way to accomplish this via WHM so that it will not be overwritten in future updates?

    This is what we want
    - Indexes off by default for all websites
    - Allow users to enable it when needed via .htaccess
    - Allow showing the icons also via .htaccess ("FancyIndexing")

    We have 1+2 working now, but the problem is that no icons are showing.

    In a particular folder's .htaccess for example, we normally use:
    IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble


    In Service Config->Apache Config->Global Config, Indexes is unticked/off.

    Turning it on here, caused indexes to show up everywhere:
    Indexes gets added to the options within <Directory "/">
    We do not want them on everywhere by default. Further, we still didn't get any icons.

    I can see that all the directives related to the icons are in
    /usr/local/apache/conf/extra/httpd-autoindex.conf
    But that doesn't appear to be included anywhere in the active .conf files even when Indexes is turned on in global config
     
  2. ottdev

    ottdev Well-Known Member

    Joined:
    Oct 1, 2013
    Messages:
    63
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Got it! But please chime in if there's a better way.
    We kept Indexes off. Added to pre_main_global.conf (via Apache Config->Include Editor)

    Include "/usr/local/apache/conf/extra/httpd-autoindex.conf"

    Hint: Having this Alias to /icons/ acts like a server-wide image folder. It allows us to do things like place a "coming soon" image in the icons folder and include that image in our skeleton index page <img src="/icons/comingsoon.gif">
     
    #2 ottdev, Feb 20, 2016
    Last edited: Feb 20, 2016
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page