Domain alias support for Webalizer
authorAdam Chlipala <adamc@hcoop.net>
Sun, 29 Apr 2007 21:17:55 +0000 (21:17 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sun, 29 Apr 2007 21:17:55 +0000 (21:17 +0000)
src/main.sml
src/plugins/apache.sml

index bea07af..90a0ee4 100644 (file)
@@ -1253,6 +1253,12 @@ fun service () =
                            OpenSSL.close bio
                            handle OpenSSL.OpenSSL _ => ();
                            loop ())
                            OpenSSL.close bio
                            handle OpenSSL.OpenSSL _ => ();
                            loop ())
+                        | IO.Io {name, function, cause} =>
+                          (print ("IO error: " ^ function ^ " for " ^ name ^ "\n");
+                           app (fn x => print (x ^ "\n")) (SMLofNJ.exnHistory cause);
+                           OpenSSL.close bio
+                           handle OpenSSL.OpenSSL _ => ();
+                           loop ())
                         | e =>
                           (print "Unknown exception in main loop!\n";
                            app (fn x => print (x ^ "\n")) (SMLofNJ.exnHistory e);
                         | e =>
                           (print "Unknown exception in main loop!\n";
                            app (fn x => print (x ^ "\n")) (SMLofNJ.exnHistory e);
index 7e3deb5..e5fe47b 100644 (file)
@@ -462,7 +462,8 @@ val () = Env.containerV_one "vhost"
                      write cert)
                   | NONE => ();
                 write "\n";
                      write cert)
                   | NONE => ();
                 write "\n";
-                !pre {user = user, nodes = nodes, id = vhostId, hostname = fullHost}
+                !pre {user = user, nodes = nodes, id = vhostId, hostname = fullHost};
+                app (fn dom => !aliaser (host ^ "." ^ dom)) (Domain.currentAliasDomains ())
             end,
          fn () => (!post ();
                    write "</VirtualHost>\n";
             end,
          fn () => (!post ();
                    write "</VirtualHost>\n";