factor out nginx config templates