hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : how do I disable "directory browsing"
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

how do I disable "directory browsing"

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-11-2003, 01:17 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
*

how do I disable "directory browsing"


directories that do not have an index file tend to show you the contents of that directory (simple or graphic wise). How do I disable this feature?

I think its through SSH but does any know how? Thanks!

Reply With Quote


Sponsored Links
  #2  
Old 10-11-2003, 01:22 PM
dbzgod dbzgod is offline
Aspiring Evangelist
 
Join Date: Jul 2001
Posts: 424
Options -Indexes

Put that line into a .htaccess file in each directory you want to disable directory browsing for.

Reply With Quote
  #3  
Old 10-11-2003, 01:33 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
but that is gonna kill me since i have more than 300 directories don't you think? I need an SSH solutions to turn it off completely.

Thanks anyways

Reply With Quote
Sponsored Links
  #4  
Old 10-11-2003, 01:35 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
i tried search earlier and all it returned was two threads that had NOTHING to do with what i am asking.
any help pls?

Reply With Quote
  #5  
Old 10-11-2003, 01:54 PM
Eric Lim Eric Lim is offline
Web Hosting Master
 
Join Date: Feb 2003
Location: Providence, RI
Posts: 1,512
Add this into your httpd configuration file

<Directory /directory/to/you/web/root/>
Options -Indexes
</Directory>

It should do all the work.

Reply With Quote
  #6  
Old 10-11-2003, 02:26 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
cyberservers... thanks! but where can i find that httpd conf file? can you give me a Linux path example? thanks again

Reply With Quote
  #7  
Old 10-11-2003, 02:28 PM
sprintserve sprintserve is offline
Retired Moderator
 
Join Date: Jan 2003
Posts: 9,002
Are you trying to disable it totally for your server? If so, look in your httpd.conf for this section starting with this line:

<Directory /home/*/public_html>

Chances are they are commented out. Uncomment them out till

</Directory>

In the line with Options

Add

-Indexes

Save and restart Apache.

__________________
••• 100% Customer Satisfaction!!! •••
••• http://www.sprintserve.net •••
••• Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | •••
••• Services: | Managed Multiple Cores 64bit Servers | Server Management | •••

Reply With Quote
  #8  
Old 10-11-2003, 02:34 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
where can i find httpd.conf file?
its not under public_html......... sorry, newbie here

Reply With Quote
  #9  
Old 10-11-2003, 02:38 PM
sprintserve sprintserve is offline
Retired Moderator
 
Join Date: Jan 2003
Posts: 9,002
/usr/local/apache/conf/httpd.conf

__________________
••• 100% Customer Satisfaction!!! •••
••• http://www.sprintserve.net •••
••• Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | •••
••• Services: | Managed Multiple Cores 64bit Servers | Server Management | •••

Reply With Quote
  #10  
Old 10-11-2003, 02:48 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
tanks tanks tanks!! life saver is what you are!

Reply With Quote
  #11  
Old 10-11-2003, 04:08 PM
cactus cactus is offline
Web Hosting Master
 
Join Date: May 2001
Posts: 1,005
Talking

No need to go all the trouble to edit your httpd.conf

If you have WHM(root) go to:

Account Function:

>Skeleton Directory

root/cpanel3-skel
This directory is what will be used as a skelton for new accounts. For example if you place an index.html file in /root/cpanel3-skel/public_html, and then setup a new account, that account with have a copy of your index.html in their public_html directory.

Regards

__________________
WHO AM I? CLICK HERE!

Reply With Quote
  #12  
Old 10-11-2003, 04:23 PM
cactus cactus is offline
Web Hosting Master
 
Join Date: May 2001
Posts: 1,005
Oh I forgot! If you are a reseller and setting new accounts, Using your WHM(reseller) then also go to and upload a default page to:

Account Function:

>Skeleton directory

/home/Reseller_Username/cpanel3-skel
This directory is what will be used as a skelton for new accounts. For example if you place an index.html file in /home/Reseller_Username/cpanel3-skel/public_html, and then setup a new account, that account with have a copy of your index.html in their public_html directory

In your index.html just put some text for example "UNDER CONSTRUCTION" and add maybe an image to the page, animation gif would look good.


Regards

__________________
WHO AM I? CLICK HERE!


Last edited by cactus; 10-11-2003 at 04:31 PM.
Reply With Quote
  #13  
Old 10-11-2003, 05:08 PM
cactus cactus is offline
Web Hosting Master
 
Join Date: May 2001
Posts: 1,005
An alternative method if you wish to turn off the directory listing for existing accounts without an index.html default page

Edit your /usr/local/apache/conf/access.conf

and remove the word "Indexes"

After editing it will look like this:

<Directory />
Options FollowSymLinks ExecCGI Includes
AllowOverride All
order allow,deny
allow from all
</Directory>


You must restart Apache for these changes to go into effect. You can restart Apache through your WHM(root) or at the command line.

/etc/rc.d/init.d/httpd stop

/etc/rc.d/init.d/httpd start


The result instead of the directory listing:

Forbidden
You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

---------------------------------------------------------------------
Apache/1.3.28 Server at www.domainname.com Port 80



Regards

__________________
WHO AM I? CLICK HERE!


Last edited by cactus; 10-11-2003 at 05:33 PM.
Reply With Quote
  #14  
Old 10-11-2003, 06:17 PM
kipasa kipasa is offline
Disabled
 
Join Date: Sep 2003
Posts: 109
cactus your method worked flawlessly... thank you!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Windows Azure Offers Active Directory in General Availability Web Hosting News 2013-04-09 14:09:20
50c21c1c-1d94-4ed4-adac-26fa45a79943 Listing 2013-03-05 18:26:32
Google Plans to Disable Online Revocation Checks in Future Chrome Versions Web Hosting News 2012-02-09 13:26:57
Get listed in WHIR Magazine's 5th Annual Hottest Hosts Issue coming in January 2012 Blog 2011-10-18 18:35:27
Browsers Disable DigiNotar After Rogue Certificate Used in Gmail Attack Web Hosting News 2011-08-30 14:20:17


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?