anchor.diff:  	webapps = mkOption {
   	  default = [ pkgs.tomcat6 ];
   	  description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
  +	};
  +	
  +	virtualHosts = mkOption {
  +	  default = [];
  +	  description = "List consisting of a virtual host name and a list of web applications to deploy on each virtual host";
   	};
   	
   	axis2 = {
  
positive.code: 	    sed -e 's|''${catalina.home}|''${catalina.base}|g' \
                  -e 's|shared.loader=|shared.loader=''${catalina.base}/shared/lib/*.jar|' \
  		${pkgs.tomcat6}/conf/catalina.properties > ${cfg.baseDir}/conf/catalina.properties
  	    	    
  	    # Create a logs/ directory
  	    mkdir -p ${cfg.baseDir}/logs
  	    chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/logs
  
negative.code: 		        ln -sf $j ${cfg.baseDir}/webapps/`basename $j`
  		    done
  		fi
  	    done	    	    
  	    
  	    ${toString (map (virtualHost: ''
  	      # Create webapps directory for the virtual host
  	      mkdir -p ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps
  	      
  	      # Modify ownership
  	      chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps
  	      
  	      # Symlink all the given web applications files or paths into the webapps/ directory
  	      # of this virtual host
  	      for i in ${toString virtualHost.webapps}
  	      do
  		  if [ -f $i ]
  		  then
  		      # If the given web application is a file, symlink it into the webapps/ directory
  		      ln -sf $i ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $i`
  		  elif [ -d $i ]
  		  then
  		      # If the given web application is a directory, then iterate over the files
  		      # in the special purpose directories and symlink them into the tomcat tree
  		    
  		      for j in $i/webapps/*
  		      do
  		          ln -sf $j ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $j`
  		      done
                    fi	                  
  	      done
  	      
  	      ''
  	    ) cfg.virtualHosts) }
  	    
  	    # Create a work/ directory
  	    mkdir -p ${cfg.baseDir}/work
  