Regarding to the picture from rules: Is it possible to be within 8" of mine, have LoF and do not trigger it (dude on top and red line)?
No, it's not possible*. The template is more than 8" long. * Some very specific setup can make it possible, but you need to use your opponent's troopers or equipment to accomplish this rather than the wall
So the marked area in rules is marked incorrectly? The same situation with other example: There is clear LoF between 2 models (green line) and one is marked as not affected by template. Am I allowed to place template in other way to hit all 3 enemy models?
Keep in mind that the image you have pasted here is correct, but it is not an image showing a mine's obligatory placement, but rather intended to illustrate how scenery can prevent a unit from being affected even if the template itself is touching the unit. Yes, you can place the template aligned with the green line to (likely) catch more units, and with a mine if the trooper behind the wall is the only active trooper, you have to. Note that the illustrations for a mine's trigger area are erroneous as they've aligned the area of effect to the centre of the mine Marker which is quite incorrect. Ordinarily this doesn't matter, but you are specifically asking about the situation that CB missed in their illustration