Answer: as far as you need to and want to. 20 miles with rest breaks should be a good starting target.
I did this - my first "big" ride a year ago was 20 km total, and it completely exhausted me. A year later I'm doing a 116 km ride.
The best technique is many little steps. Pick places that are ~10 miles away and do a round trip, stopping in the middle for a drink and snack. Then up the distance after a 4-6 weeks or forgo the stop in the middle.
Also do a "scenic tour" when coming home from work. I do 3km to work, and 10~20km on the way back. I prefer to have a calm ride to work and do the exercise on the way home.
Track your rides with something like http://strava.com/ Run the app on a fancyphone and it will keep all your records for you like average speed and best time on segments. Stats and leaderboards are a good motivation.
Make your rides useful - if you need to go somewhere for a purpose, allow the time to ride rather than drive. Exception being if you need to be presentable/not sweaty.
Make your rides safe. Avoid the scary roads, have bright clothes, lights etc.
Remember its not just distance. You should spend time grinding up your local hills, and whizzing down them too.
Set yourself significant goals with rewards. I started with a MTB, bought a real (used) road bike on completion of an event, and now I'm preparing for Le Race, which is 100 km with ~4km vertical. When I complete that I'll consider buying a brand new road bike.
All this can help you increase your distance and speed and decrease your recovery times.