Python Virtual Host Creator

I just threw together a quick Python script which generates a virtual host file, enables it, creates the web directory and restarts the webserver. It’s basic – but I found it useful.  Maybe someone else will too. #!/usr/bin/python import os, sys, getopt def main(argv): try: opts, args = getopt.getopt(argv, “hd:a:”, ["help", "domain="]) except getopt.GetoptError: usage() [...]