welcome: please sign in

Diff for "DomTool/Examples/Full"

Differences between revisions 2 and 88 (spanning 86 versions)
Revision 2 as of 2007-11-12 03:01:09
Size: 2920
Editor: MichaelOlson
Comment: Add note for ssl sites
Revision 88 as of 2008-04-15 01:41:50
Size: 3261
Editor: AdamChlipala
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

This page contains a number of working examples of DomTool configuration.
This page contains a number of working examples of DomTool configuration.  People are welcome to add their own working examples to this page if they like.
Line 7: Line 6:
= MichaelOlson =

Here is MichaelOlson's annotated DomTool configuration.
= spinlocksolutions.com =
Here is DavorOcelic's annotated DomTool configuration.
Line 12: Line 10:
domain "mwolson.org" with
  (* DNS settings *)
  nameserver "ns1.hcoop.net";
  nameserver "ns3.hcoop.net";
  dnsDefault "69.90.123.68";
  dnsIP "www" "69.90.123.68";
  dnsIP "blog" "69.90.123.68";
  dnsIP "hariken" "66.253.212.116"; (* my home computer *)
  dnsIP "mail" "69.90.123.67";
  dnsMail 10 "mail.mwolson.org";
dom "spinlocksolutions.com" where
  Aliases = ["spinlock-solutions.com"];
  DocumentRoot = home "web/spinlocksolutions.com";
  WWW = begin
    addDefaultCharset "utf-8";
Line 23: Line 16:
  (* Default webspace *)
  vhost "www" where
    DocumentRoot = (home "public_html");
    scriptAlias "/cgi-bin/" ( home "web/cgi-bin/" );
    scriptAlias "/sl" ( home "web/cgi-bin/sl" );

    (* directoryIndex ["/sl/index"]; *)
    rewriteRule "^/$" "/sl/index" [redirectWith permanent];

    alias "/debian" ( home "debian/repository" );
    directory ( home "debian/repository" ) with
            options [ indexes ];
            orderAllowDeny;
            allowFromAll;
    end end
with
  dnsIP "secure" mire_ip;
  dnsIP "mail" deleuze_ip;
  dnsIP "rt" "195.29.212.142";

  web "techpubs" where
    DocumentRoot = home "web/techpubs.sl.com";
Line 28: Line 37:
    serverAliasDefault;     directoryIndex ["index.html"];
Line 30: Line 39:
    (* Change www.mwolson.org to mwolson.org *)
    rewriteCond "%{HTTP_HOST}" "^www\.mwolson\.org$" [cond_nocase];
    rewriteRule "^(.*)$" "http://mwolson.org$1" [redirectWith redir301,last];

    scriptAlias "/cgi-bin/" (home "cgi-bin/");
    rewriteRule "^/$" "http://mwolson.org/web/WelcomePage.html" [last];
    rewriteRule "^/blog/projects(.*)"
                "http://blog.mwolson.org/tech/projects$1"
                [redirectWith redir301,last];
    rewriteRule "^/blog([^.].*)" "http://blog.mwolson.org$1"
                [redirectWith redir301,last];
    rewriteRule "^/cs158" "http://mwolson.org/classes/cs158/index.html" [];
    rewriteRule "^/favicon\.ico$"
                "http://mwolson.org/static/logos/favicon.ico" [];
    rewriteRule "^/static/albums/(.*)"
                "http://mwolson.risnerolson.org/albums/$1" [];
    directory ( home "web/techpubs.sl.com/" ) with
            options [ indexes, followSymLinks ];
            orderAllowDeny;
            allowFromAll;
            (* addDescription "Hands-on Debian GNU Guide" ["debian.html"]; *)
        headerName "/HEADER.html";
        readmeName "README";
        indexOptions [descriptionWidth autofit, fancyIndexing,
          foldersFirst, nameWidth autofit, scanHtmlTitles ,
          suppressHtmlPreamble, trackModified, versionSort,
          suppressRules, suppressIcon];
        indexIgnore [".htaccess", "*.bak", "*~"];
    end;
Line 48: Line 54:
  (* Example of serving page to deleuze, should we ever decide to *)
  (* allow that *)

(* vhost "git" where *)
(* WebNodes = ["deleuze"]; *)
(* with ... *)
(* end; *)

  (* Blog *)
  vhost "blog" where
    DocumentRoot = (home "public_html/blog");
  with
    addDefaultCharset "utf-8";
    alias "/favicon.ico" (home "public_html/static/logos/favicon.ico");
    alias "/comments.js" (home "public_html/comments.js");
    rewriteRule "^/projects(.*)" "http://blog.mwolson.org/tech/projects$1" [];
    scriptAlias "/" (home "cgi-bin/pyblosxom/pyblosxom.cgi/");
  web "secure" with
    rewriteRule "^(.*)$" "https://secure.spinlocksolutions.com$1" [redirect]
Line 67: Line 58:
  (* DAV access *)
  vhost "dav" with
    rewriteRule "^(.*)$" "https://dav.mwolson.org$1" [redirect];
  end;

  vhost "dav" where
    DocumentRoot = (home "dav");
    (* NOTE: The following is a temporary measure. It probably *)
    (* won't work for you. See MemberManual/ServingWebsites. *)
    SSL = use_cert "/etc/apache2/ssl/apache.pem";
  web "secure" where
    DocumentRoot = home "web/spinlocksolutions.com";
    SSL = use_cert "/etc/apache2/ssl/apache.pem"
Line 80: Line 64:
    location "/" with
      davFilesystem;
    scriptAlias "/cgi-bin/" ( home "web/cgi-bin/" );
    scriptAlias "/sl" ( home "web/cgi-bin/sl" );
    (* directoryIndex ["/sl/index"]; *)
    rewriteRule "^/$" "/sl/index" [redirectWith permanent];

    alias "/debian" ( home "debian/repository" );
    directory ( home "debian/repository" ) with
            options [ indexes ];
            orderAllowDeny;
            allowFromAll;
Line 84: Line 76:

  (* email *)
  handleMail;
  emailAlias "me" "mwolson";
  emailAlias "me.purdue" "mwolson";
  emailAlias "me.vending" "mwolson";
  emailAlias "mwolson" "mwolson";
  emailAlias "hostmaster" "mwolson";
  emailAlias "news" "mwolson";
  emailAlias "webmaster" "mwolson";
Line 96: Line 78:
= distortions.net =
Here's RyanMikulovsky's very simple example:

{{{
dom "distortions.net" where
  DefaultAlias = false; (* avoids *@distortions.net e-mail alias *)
  DocumentRoot = home "public_html/distortions.net/"
with
  emailAlias "ryan" "ryan@hcoop.net"; (* the only e-mail address I want *)
  wordPress "geology" where (* sets up proper rewrite rules etc. *)
   DocumentRoot = home "public_html/geo/wordpress/"
  end;
  web "biblio" where
    DocumentRoot = home "public_html/distortions.net/biblio";
  with
   addDefaultCharset "utf-8"; (* probably not necessary... *)
  end;
  web "chemistry" where
   DocumentRoot = home "public_html/chemistry";
  with
  end;
  web "gallery" where (* for Gallery PHP software *)
   DocumentRoot = home "public_html/gallery";
  with
  end;
end;
}}}

This page contains a number of working examples of DomTool configuration. People are welcome to add their own working examples to this page if they like.

TableOfContents

spinlocksolutions.com

Here is DavorOcelic's annotated DomTool configuration.

dom "spinlocksolutions.com" where
  Aliases = ["spinlock-solutions.com"];
  DocumentRoot = home "web/spinlocksolutions.com";
  WWW = begin
    addDefaultCharset "utf-8";

    scriptAlias "/cgi-bin/" ( home "web/cgi-bin/" );
    scriptAlias "/sl" ( home "web/cgi-bin/sl" );

    (* directoryIndex ["/sl/index"]; *)
    rewriteRule "^/$" "/sl/index" [redirectWith permanent];

    alias "/debian" ( home "debian/repository" );
    directory ( home "debian/repository" ) with
            options [ indexes ];
            orderAllowDeny;
            allowFromAll;
    end end
with
  dnsIP "secure" mire_ip;
  dnsIP "mail" deleuze_ip;
  dnsIP "rt" "195.29.212.142";

  web "techpubs" where
    DocumentRoot = home "web/techpubs.sl.com";
  with
    addDefaultCharset "utf-8";
    directoryIndex ["index.html"];

    directory ( home "web/techpubs.sl.com/" ) with
            options [ indexes, followSymLinks ];
            orderAllowDeny;
            allowFromAll;
            (* addDescription "Hands-on Debian GNU Guide" ["debian.html"]; *)
        headerName "/HEADER.html";
        readmeName "README";
        indexOptions [descriptionWidth autofit, fancyIndexing,
          foldersFirst, nameWidth autofit, scanHtmlTitles ,
          suppressHtmlPreamble, trackModified, versionSort,
          suppressRules, suppressIcon];
        indexIgnore [".htaccess", "*.bak", "*~"];
    end;
  end;

  web "secure" with
    rewriteRule "^(.*)$" "https://secure.spinlocksolutions.com$1" [redirect]
  end;

  web "secure" where
    DocumentRoot = home "web/spinlocksolutions.com";
    SSL = use_cert "/etc/apache2/ssl/apache.pem"
  with
    addDefaultCharset "utf-8";

    scriptAlias "/cgi-bin/" ( home "web/cgi-bin/" );
    scriptAlias "/sl" ( home "web/cgi-bin/sl" );
    (* directoryIndex ["/sl/index"]; *)
    rewriteRule "^/$" "/sl/index" [redirectWith permanent];

    alias "/debian" ( home "debian/repository" );
    directory ( home "debian/repository" ) with
            options [ indexes ];
            orderAllowDeny;
            allowFromAll;
    end;
  end;
end;

distortions.net

Here's RyanMikulovsky's very simple example:

dom "distortions.net" where
  DefaultAlias = false;  (* avoids *@distortions.net e-mail alias *)
  DocumentRoot = home "public_html/distortions.net/"
with
  emailAlias "ryan" "ryan@hcoop.net"; (* the only e-mail address I want *)
  wordPress "geology" where (* sets up proper rewrite rules etc. *)
   DocumentRoot = home "public_html/geo/wordpress/"
  end;
  web "biblio" where
    DocumentRoot = home "public_html/distortions.net/biblio";
  with
   addDefaultCharset "utf-8"; (* probably not necessary... *)
  end;
  web "chemistry" where
   DocumentRoot = home "public_html/chemistry";
  with
  end;
  web "gallery" where (* for Gallery PHP software *)
   DocumentRoot = home "public_html/gallery";
  with
  end;
end;

DomTool/Examples/Full (last edited 2018-10-20 18:24:55 by ClintonEbadi)