Best practices doc for gallery

Are there any “best practices” docs for how to set up gallery properly and securely? for example, like what needs to go in to robots.txt or htaccess to block the search engines? Also where should the data directory go and what should the permissions be for that directory? I found a few wikis but none contain all the info I am looking for.