Coat it in epoxy and finish the end grains with a layer of fiberglass. You'll need a layer of paint on top of this because epoxy is not very UV stable. Starting with pressure treated lumber might not be a bad idea either.
It'll go a looooong time that way.