changed apache to use templates