Move nginx stuff to a module