The general rule is
One-word modifiers precede the noun; modifiers of more than one word follow the noun.
I call this the Eleven-year-old boy rule.
If you make a single word out of a phrase, it can precede (that's what the hyphens are for in writing), but it's got different syntax, because preceding adjectives are not declined for number.
Note the plural years and singular year below:
- A boy eleven years old rescued the princess.
- An eleven-year-old boy rescued the princess.
If you pluralized the second year, or used singular year in the first, they'd be ungrammatical.
Nearby, while it is enough of a single word to precede, still retains enough independence in its two consituents near and by to follow, as well. It's in transition from one state to the other.
Language changes, word by word and phrase by phrase, as we continue to speak it. In fact, it changes because we continue to speak it.