SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    protecting my cgi-bin

    Hi All,

    How do I prevent people from typing in www.mysite.com/cgi-bin/ and getting the complete index list of all the folders and programs in my cgi-bin??!

    Thanks.

    Josh

  2. #2
    SitePoint Member pickup's Avatar
    Join Date
    Jun 2001
    Location
    Montreal, Quebec, Canada
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is an easy way and a better way.

    The easiest way is to create a blank index.html file and upload it there. You could of course put a redirect into it also if you want. You'll need to do this for each directory in there as well.

    The best way is to tell your host not to allow 'Indexes' in cgi-bin directories. It needs to be modified in the central Apache configuration but is the best choice since it will help out others on your server as well.

    As an aside, if you have a directory where you don't want anyone to access directly, add an .htaccess file that contains:

    Order deny,allow
    Deny from all

    Which will block all access. BUT, scripts won't run either so this is only for really private directories.
    My life blood:
    BuildACommunity.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •