Updated code to write Apache configuration files