Deprecated: Function create_function() is deprecated in /home2/blogwebhostingbu/public_html/wp-content/plugins/facebook-like-box-responsive/facebook-like-box.php on line 29
How reseller or VPS can change directory indexing default - WebHostingBuzz US Blog
Notice: Undefined variable: defaults in /home2/blogwebhostingbu/public_html/wp-content/plugins/fatpanda-facebook-comments/plugin.php on line 366
 

How reseller or VPS can change directory indexing default

Posted on 08 Feb 2011 by Alan Burns

A few days ago I explained how to use cPanel’s Index Manager function to prevent or alter directory indexing. Today I’ll tell you how a reseller or VPS (Virtual Private Server) hosting account can change this default for all new cPanel accounts.

Reseller

  1. First, create a text file. In that text file, paste the following line:

    Options -Indexes

  2. Save that text file as “.htaccess”.

    If your text editor won’t let you choose that filename, save it as htaccess.txt. Then, in your file explorer select that file icon and change the filename to “.htaccess”. If your system still won’t allow that, then leave it as is and change the filename after you upload the file to your web hosting account.

  3. Create a /public_html directory within your skeleton directory. (If you followed my instructions in my earlier article to create a default web page, then this directory already exists.
  4. Upload the .htaccess file to /cpanel3-skel/public_html.

Any newly-created cPanel account I create will now have directory indexing disabled for all web directories. If the new cPanel account holder wants a different setting, he/she may use cPanel’s Index Manager function to enable directory indexing.

VPS

VPS accounts have a higher level of control than resellers, and can make server config changes. A VPS account can change the default for directory indexing to disabled.

  1. Login to VPS as root.
  2. Service Configuration > Apache Configuration > Global Configuration.
  3. Under “Directory ‘/’ Options” uncheck “Indexes”.

This disables directory indexing for all accounts under the VPS. If a cPanel account holder wants a different setting, he/she may use cPanel’s Index Manager function to enable directory indexing.

WebHostingBuzz Logo

© WebHostingBuzz USA LLC 2002 - 2024
WebHostingBuzz is a Registered Trademark.
All Rights Reserved.
WebHostingBuzz USA LLC, 850 Southbridge Street, Auburn, MA 01501, USA

1 (800) 252-1887

Payment Logos
  • Webmoney Verified
  • Webmoney Accepted

Sign up for our Newsletter

Scroll to Top