[solved] Auto Index Not Working.

Discussion in 'Install/Configuration' started by rlshosting, Jul 24, 2012.

  1. rlshosting

    rlshosting New Member

    404 Not Found
    The resource requested could not be found on this server! Powered By LiteSpeed Web Server
    LiteSpeed Technologies is not responsible for administration and contents of this web site!

    I upgraded to the latest version and set auto index to Yes and /_autoindex/default.php. It isn't working server wide. It's showing the error instead.
    Last edited by a moderator: Jul 25, 2012
  2. NiteWave

    NiteWave Administrator

    it may be overwritten by setting somewhere.

    please check:

    admin console->Server->General->Auto Index:Yes

    any control panel ? what's the previous version ?
  3. rlshosting

    rlshosting New Member

    cPanel with Cloud Linux. Version 4.1.12 is the previous version. Version 4.1.13 is the version that I upgraded to.

    I did that already. Auto Index >> Yes
  4. NiteWave

    NiteWave Administrator

    can't simply reproduce it in our lab -- tested on 4.1.12/4.1.11

    please check this setting:
    Options (+/-)Indexes
    in /usr/local/apache/conf/httpd.conf
    and .htaccess in user's home directory
    /home/user/.htaccess
    /home/user/public_html/.htaccess

    let's see if we can reproduce at our lab.
  5. rlshosting

    rlshosting New Member

    What about version 4.1.13? Also, no .htaccess files.
    Code:
    #  Templates with the '.local' extension will be preferred over templates with the '.default' extension.        #
    #  The only template updated by the apache_conf_distiller is main.default.                                      #
    # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    
    
    Include "/usr/local/apache/conf/includes/pre_main_global.conf"
    Include "/usr/local/apache/conf/includes/pre_main_2.conf"
    
     
    
    LoadModule perl_module modules/mod_perl.so
    LoadModule hostinglimits_module modules/mod_hostinglimits.so
    LoadModule bwlimited_module modules/mod_bwlimited.so
    LoadModule bw_module modules/mod_bw.so
    LoadModule qos_module modules/mod_qos.so
    
    
    
    
    Include "/usr/local/apache/conf/modhostinglimits.conf"
    Include "/usr/local/apache/conf/php.conf"
    Include "/usr/local/apache/conf/mod_bandwidth.conf"
    Include "/usr/local/apache/conf/includes/errordocument.conf"
    Include "/usr/local/apache/conf/modsec2.conf"
    
    
    RLimitMEM 1041633280 
    RLimitCPU 240 
    ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
    ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
    
    RewriteEngine on
    AddType text/html .shtml
    
    Alias /interchange-5 /usr/local/cpanel/3rdparty/interchange/share/interchange-5/
    Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /interchange /usr/local/cpanel/3rdparty/interchange/share/interchange/
    Alias /java-sys /usr/local/cpanel/java-sys/
    Alias /img-sys /usr/local/cpanel/img-sys/
    Alias /bandwidth /usr/local/bandmin/htdocs/
    Alias /sys_cpanel /usr/local/cpanel/sys_cpanel/
    Alias /akopia /usr/local/cpanel/3rdparty/interchange/share/akopia/
    
    
    ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/
    ScriptAlias /mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/
    ScriptAlias /scgi-bin /usr/local/cpanel/cgi-sys/scgiwrap
    
    
    <IfModule mod_rewrite.c>
        RewriteEngine on
    </IfModule>
    
    <IfModule mod_log_config.c>
        LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedvhost
        LogFormat "%v %{%s}t %I .\n%v %{%s}t %O ." bytesvhost
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
        LogFormat "%{Referer}i -> %U" referer
        LogFormat "%{User-agent}i" agent
    
        CustomLog "|/usr/local/cpanel/bin/splitlogs --main=server.premiumcheap.com --suffix=-bytes_log" bytesvhost
        CustomLog "|/usr/local/cpanel/bin/splitlogs --main=server.premiumcheap.com --mainout=/usr/local/apache/logs/access_log" combinedvhost
    
    </IfModule>
    
    <Directory "/usr/local/apache/htdocs">
        Options Includes Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    
    </Directory>
    
    # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    #   Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the       #
    #   configuration file. To have modifications retained, all modifications must be checked into the              #
    #   configuration system by running:                                                                            #
    #       /usr/local/cpanel/bin/apache_conf_distiller --update                                                    #
    #   To see if your changes will be conserved, regenerate the Apache configuration file by running:              #
    #       /usr/local/cpanel/bin/build_apache_conf                                                                 #
    #   and check the configuration file for your alterations. If your changes have been ignored, then they will    #
    #   need to be added directly to their respective template files.                                               #
    #                                                                                                               #
    #   It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf       #
    #   For detailed instructions on using Include files and the apache_conf_distiller with the new configuration   #
    #   system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html       #
    #                                                                                                               #
    #   This configuration file was built from the following templates:                                             #
    #     /var/cpanel/templates/apache2/main.default                                                                #
    #     /var/cpanel/templates/apache2/main.local                                                                  #
    #     /var/cpanel/templates/apache2/vhost.default                                                               #
    #     /var/cpanel/templates/apache2/vhost.local                                                                 #
    #     /var/cpanel/templates/apache2/ssl_vhost.default                                                           #
    #     /var/cpanel/templates/apache2/ssl_vhost.local                                                             #
    #                                                                                                               #
    #  Templates with the '.local' extension will be preferred over templates with the '.default' extension.        #
    #  The only template updated by the apache_conf_distiller is main.default.                                      #
    # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    
    
    PidFile logs/httpd.pid
    LockFile logs/accept.lock
    # Defined in /var/cpanel/cpanel.config: apache_port
    Listen 0.0.0.0:80
    User nobody
    Group nobody
    ExtendedStatus On
    LogLevel warn
    
    # These can be set in WHM under 'Apache Global Configuration'
    Timeout 300
    TraceEnable Off
    ServerSignature Off
    ServerTokens ProductOnly
    FileETag None
    StartServers 5
    <IfModule prefork.c>
    MinSpareServers 5
    MaxSpareServers 10
    </IfModule>
    ServerLimit 256
    MaxClients 150
    MaxRequestsPerChild 10000
    KeepAlive On
    KeepAliveTimeout 5
    MaxKeepAliveRequests 100
    
    RewriteEngine on
    RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
    RewriteLock /usr/local/apache/logs/rewrite_lock
    
    UserDir public_html
    
    # DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
    DirectoryIndex index.php index.php5 index.php4 index.php3 index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.phtml index.shtml index.xhtml index.html index.htm index.wml Default.html Default.htm default.html default.htm home.html home.htm
    
    # SSLCipherSuite can be set in WHM under 'Apache Global Configuration'
    SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH
    SSLPassPhraseDialog  builtin
    SSLSessionCache         dbm:/usr/local/apache/logs/ssl_scache
    SSLSessionCacheTimeout  300
    SSLMutex  file:/usr/local/apache/logs/ssl_mutex
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    
        # Defined in /var/cpanel/cpanel.config: apache_ssl_port
        Listen 0.0.0.0:443
        AddType application/x-x509-ca-cert .crt
        AddType application/x-pkcs7-crl .crl
    
    
    AddHandler cgi-script .cgi .pl .plx .ppl .perl
    AddHandler server-parsed .shtml
    AddType text/html .shtml
    AddType application/x-tar .tgz
    AddType text/vnd.wap.wml .wml
    AddType image/vnd.wap.wbmp .wbmp
    AddType text/vnd.wap.wmlscript .wmls
    AddType application/vnd.wap.wmlc .wmlc
    AddType application/vnd.wap.wmlscriptc .wmlsc
    
    <Location /whm-server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
    
    
    
    # SUEXEC is supported
    
    Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
    Last edited: Jul 3, 2013
  6. NiteWave

    NiteWave Administrator

    4.1.13 is same as 4.1.11 and 4.1.12
    can you be more specific? it happens when access a vhost's root?

    also there are many include in your httpd.conf:
    Include "/usr/local/apache/conf/includes/pre_main_global.conf"
    Include "/usr/local/apache/conf/includes/pre_main_2.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"

    need check them as well(for Options Indexes setting)
  7. rlshosting

    rlshosting New Member

    It happens when you add an account or you add no index.html or index.php file etc. It just shows a 404. No files. If you add index.php etc. it works fine. The php parses fine and the mysql works. The html pages load fine too.

    Could you please login my server and fix it if I pm you my ip address and root password?

    Include "/usr/local/apache/conf/includes/pre_main_global.conf"
    Include "/usr/local/apache/conf/includes/pre_main_2.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
    Those files are blank for some reason...They have no content in them.
  8. NiteWave

    NiteWave Administrator

    ok. please give the sample URL as well which show 404.
  9. rlshosting

    rlshosting New Member

  10. NiteWave

    NiteWave Administrator

    tried 4.1.11/12/13, they are behaving same.
    also switched back back to apache for a few seconds, directory index shows.

    so the issue looks to be:
    when no "Options Indexes" setting at all from server to vhost, directory level, .htaccess, will directory index work?

    looking at apache document:
    http://httpd.apache.org/docs/2.2/mod/core.html
    the default is "Options All", so should show directory index.

    I tried to add
    Options All
    or
    Options Indexes
    in /home/usr/public_html/.htaccess, directory index shows as expected.

    Will report this issue to develop.
  11. rlshosting

    rlshosting New Member

    Oh Ok. Thank you.
  12. NiteWave

    NiteWave Administrator

    please force re-install 4.1.13, it's been fixed by development -- directory index default is "on" now. can you confirm it.
  13. rlshosting

    rlshosting New Member

    Great! It is fixed! Thank you! Awesome Support by the way! ;)

Share This Page