Make sure it is at least 10" from the footing if it is exposed above the earth or 10" from the foundation wall if you cant see the footing. This will ensure you do not undermine the footing and you do not cause the footing to move. In a basement, the walls are held back by a concrete floor. Most crawl spaces do not have this reinforcement, so it is important that whoever is installing the drain tile not dig right next to the footing as it could allow the footing to slide into the drainage trench that holds the tile.
Your website is very helpful, and I would like to do a full encapsulation myself at some point, but first I have to address standing water in the crawlspace (during very rainy periods only). I would like to know more about the perimeter drain installation. How deep should the pipe go? What kind of pipe? What if, as in my case, the crawl space dirt is not level but slopes considerably?