Is it ok to have a french drain right against a house?
Placing the french drain against the building's foundation wall is common and the correct way to remove moisture from around the structure. Remember, the moisture will be removed down to the "flow line" of the perf pipe. Here, we encapsulate the perf pipe in an envelope of drainrock and place it a few (6") inches below what we're protecting, (I.e.: 6" below basement slab, etc.)

If you move the perf pipe (and encapsulated drainrock) away from the foundation wall, then that allows moisture to lay AGAINST the wall and potentially leak through the foundation wall.