Domains example
[hcoop/domtool2.git] / tests / domain.dtl
diff --git a/tests/domain.dtl b/tests/domain.dtl
new file mode 100644 (file)
index 0000000..39f2f78
--- /dev/null
@@ -0,0 +1,36 @@
+extern val domain : string -> Domain => [Root];
+
+extern val host : string -> string -> [Domain];
+
+extern val vhost : string -> Vhost => [Domain] {DocRoot : string};
+
+extern val directory : string -> ^Vhost & Directory => [Vhost];
+
+extern val ssi : [^Vhost];
+extern val fancy : [Directory];
+extern val risky : [Vhost];
+
+domain "hcoop.net" with
+       host "frumpkin" "1.2.3.4";
+       host "bumpkin" "1.2.3.5";
+
+       vhost "www" where
+               DocRoot = "/home/boopie"
+       with
+               risky
+       end;
+
+       DocRoot = "/etc/default";
+
+       vhost "smelly" with
+               directory "/etc/default/here" with
+                       ssi;
+                       fancy
+               end;
+               ssi
+       end;
+
+       vhost "rank" with
+               ssi
+       end
+end