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 Anaheim from the ocean
How far is Santa Cruz from the ocean
How far is Bainbridge Island from the ocean
How far is Sedona from the ocean
How far is La Jolla from the ocean
How far is Hilton Head Island from the ocean
How far is Fort Bragg from the ocean
How far is Lancaster, PA from the ocean
How far is Saint Augustine from the ocean
How far is La Spezia from the ocean