Chefchaouen is about 36 km from the ocean.
If you're driving to a town near the beach or coastline, you could try Tetouan.
How far is Raleigh from the ocean
How far is Leavenworth, WA from the ocean
How far is Hermosa Beach from the ocean
How far is Harrisburg from the ocean
How far is Fresno from the ocean
How far is Pismo Beach, CA from the ocean
How far is Madison, WI from the ocean
How far is Rapid City from the ocean
How far is Cambridge, MA from the ocean
How far is Luang Prabang from the ocean