updated template, check mod_env module before setting the environment vars