Add an integration test to check Nginx config template usage

Also reverts change to default behaviour generating config file and fixes an NPE if no SSL configuration set.