The board of supervisors of each county shall take measures as may be necessary to preserve and protect the public health in the unincorporated territory of the county, including, if indicated, the adoption of ordinances, regulations and orders not in conflict with general laws, and provide for the payment of all expenses incurred in enforcing them.