|
|
Prevent Apache from serving .DS_Store files
Would any of these suggestions prevent Apache from displaying a directory listing if someone were to try to access http://myipnumber/ or http://myipnumber/~myuserid/ without specifying a file (e.g. index.html) in the url? Or is there a way that I can force a url to the directory to access a specific file or alternates?
Prevent Apache from serving .DS_Store files
Add "-Indexes" to the document root Directory container.
Preventing Apache from listing directory contents
Yes, Lou, there is a way!
A Far More Elegant Solution
Hi, Lou,
Just needed to give myself a minute to come up with something better than my last solution! First I told you to use IndexIgnore * so that Apache's indexing engine would not list any files in the index. Starting with my previous example, replace IndexIgnore * with this line: DirectoryIndex index.html /oops.txtYou must also create a text file name oops.txt that contains a message like, "no files here for you to see!" and store it in /Library/WebServer/Documents/. Now when anyone surfing to a directory on your machine that contains no index.html will get the message in opps.txt. This will be global for your machine, and I think this is a better solution than what I suggested earlier. Amazing what I can come up with when I RTF. :) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.16 seconds |
|