This base layout is for player with town hall level 2 and who want to farm. Be aware that your storages are full very quickly. Most likely after each attack so invest your resources wisely! It is also impossible to defend against bigger players but you can withstand other th2 or th1 attackers.
The town hall is placed outside the walls, you can place it further out if you want. Attackers most likely will take out your town hall and move on for the easy trophies. This gives you a useful 11 hour shield.
The gold and elixir storage are placed between the walls with the archer tower in front of it. The cannons are placed just next to the storages on the other side of the wall to keep attackers from other angles away.