Added endpoint selection, and made apache listen conf optional