Modesto is located in the central valley area of Northern California , 90 miles north of Fresno , 92 miles east of San Francisco , 68 miles south of the state capital of Sacramento , 66 miles west of Yosemite National Park , and 24 miles south of Stockton .