builds config file from template, fixes nginx conf bug