Queries a DB for Nginx configurations and writes them to file.