From 2c5016cd2007522f933a9f870d1b37d70db39fd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Thu, 6 Sep 2007 07:45:04 +0000 Subject: [PATCH] * src/guide.tex: Improved documentation for adding a vhost specific option (EJAB-297). SVN Revision: 922 --- doc/guide.html | 47 ++++++++++++++++++++++++++++-------- doc/guide.tex | 65 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 83 insertions(+), 29 deletions(-) diff --git a/doc/guide.html b/doc/guide.html index 6b6a2f387..06b0d23e3 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -492,6 +492,43 @@ while domain example.com is using the LDAP servers running on the domai {ldap_rootdn, "dc=localdomain"}, {ldap_rootdn, "dc=example,dc=com"}, {ldap_password, ""}]}. +

If you have several virtual hosts, +and you want to define options such as modules +with values specific for some virtual host, +instead of defining each option with the syntax +

  {<option-name>, <option-value>}
+

you must use this syntax: +

  {{add, <option-name>}, <option-value>}
+

Example: +

3.1.3  Listened Sockets

@@ -719,16 +756,6 @@ authentication on example.net: {host_config, "example.net", [{auth_method, [ldap]}]}.

  • To use internal authentication on all virtual hosts:
    {auth_method, internal}.
    -
  • If you want to define more registration_watchers or modules for a virtual host and add them to the defined for all the Jabber server, instead of defining the option name simply as modules use this: {add, modules}.

    Examples: -

    SASL Anonymous and Anonymous Login

    diff --git a/doc/guide.tex b/doc/guide.tex index d59db3b07..b50d8d19e 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -497,6 +497,52 @@ Examples: {ldap_password, ""}]}. \end{verbatim} \end{itemize} + +If you have several virtual hosts, +and you want to define options such as \term{modules} +with values specific for some virtual host, +instead of defining each option with the syntax +\begin{verbatim} + {, } +\end{verbatim} +you must use this syntax: +\begin{verbatim} + {{add, }, } +\end{verbatim} + +Example: +\begin{itemize} + \item In this example three virtual hosts have some similar modules, but there are also + other different modules for some specific virtual hosts: +\begin{verbatim} +% This ejabberd server has three vhosts: +{hosts, ["one.example.org", "two.example.org", "three.example.org"]}. + +% Configuration of modules that are common to all vhosts +{modules, + [ + {mod_roster, []}, + {mod_configure, []}, + {mod_disco, []}, + {mod_private, []}, + {mod_time, []}, + {mod_last, []}, + {mod_version, []} + ]}. + +% Add some modules to vhost one: +{host_config, "one.example.org", [{{add, modules}, [ + {mod_echo, [{host, "echo-service.one.example.org"}]} + {mod_http_bind, []}, + {mod_logxml, []} +]}]}. + +% Add a module just to vhost two: +{host_config, "two.example.org", [{{add, modules}, [ + {mod_echo, [{host, "mirror.two.example.org"}]} +]}]}. +\end{verbatim} +\end{itemize} \subsection{Listened Sockets} \label{listened} @@ -764,25 +810,6 @@ Examples: \end{verbatim} \end{itemize} -If you want to define more \term{registration\_watchers} or \term{modules} for a virtual host and add them to the defined for all the Jabber server, instead of defining the option name simply as \term{modules} use this: \term{\{add, modules\}}. - -Examples: -\begin{itemize} - \item If you defined two global watchers but on a certain virtual host only Ann should be watcher: -\begin{verbatim} -{registration_watchers, ["tom@example.com", "moe@example.net"]}. - -{host_config, "example.org", [{registration_watchers, ["ann@example.net"]}]}. -\end{verbatim} - -\item If you prefer all three to be registration watchers on that virtual host: -\begin{verbatim} -{registration_watchers, ["tom@example.com", "moe@example.net"]}. - -{host_config, "example.org", [{{add, registration_watchers}, ["ann@example.net"]}]}. -\end{verbatim} -\end{itemize} - \subsubsection{SASL Anonymous and Anonymous Login} \label{saslanonymous} \ind{sasl anonymous}\ind{anonymous login} -- 2.40.0