The earthquake was centered 10 miles west of Port Vila, the largest city in Vanuatu, a group of 80 islands that is home to about 330,000 people.