moved apache stuff to its own file