how do i turn off indexing in linux?

Discussion in 'Software' started by Keyser Soze, Oct 8, 2007.

  1. Keyser Soze

    Keyser Soze Corporal

    i have my own server and website, im tired of having to put up a index page so ppl cant see what is in my folder, so how do i turn that off i have heard it is called indexing, i would rather ppl get like a no permission error
     
  2. Shadow_Puter_Dude

    Shadow_Puter_Dude MG Authorized Malware Fighter

    By doing exactly what you are doing now; adding an index.html to the folder you don't want indexed.
     
  3. Nitrowing

    Nitrowing Specialist

    Can't you change permissions with your ftp program?
     
  4. Colemanguy

    Colemanguy MajorGeek

    I assume you want it to auto index your files for you? so you dont have to yes? Thats an apache httpd.conf option, check into that.
     
  5. Shadow_Puter_Dude

    Shadow_Puter_Dude MG Authorized Malware Fighter

    To prevent a directory from being displayed (Indexed), index.html must be present in the directory. Changing the folder permissions won't prevent it from displaying, if the files in the folder need to be accessed, remotely.

    To prevent a directory from being crawled (spidered) you must include that directory in the robots.txt, example:
    Code:
    User-agent: *
    Disallow: /cgi-bin/
    Disallow: /images/
    Disallow: /tmp/
    Disallow: /private/
    The above excludes all robots from crawling those directories. Warning, not all bots obey the robots.txt exclusions.
     
  6. Shadow_Puter_Dude

    Shadow_Puter_Dude MG Authorized Malware Fighter

    If he is paying for hosting, he isn't going to have access to httpd.conf. Especially, on a shared server.
     
  7. Shadow_Puter_Dude

    Shadow_Puter_Dude MG Authorized Malware Fighter

    I have a solution without you having to edit any configuration files.

    Place the following line of the .htaccess in the root of your site:
    Code:
    Options -Indexes
    This will prevent browsing of directories that don't contain a index.html
     
  8. Keyser Soze

    Keyser Soze Corporal


    i own my own server, ill try what the next person suggested, thanks
     
  9. Keyser Soze

    Keyser Soze Corporal

    i found the answer

    <Directory /path/to/directory>
    Options -Indexes
    </Directory>

    Insert into your apache config file and restart apache.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds