<HEAD><TITLE>Ejabberd Installation and Operation Guide</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=ISO8859-1">
-<META name="GENERATOR" content="hevea 1.06">
+<META name="GENERATOR" content="hevea 1.07">
</HEAD>
<BODY >
<!--HEVEA command line is: /usr/bin/hevea -charset ISO8859-1 guide.tex -->
<A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR>
<A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3>
-<H3 ALIGN=center>May 23, 2005</H3><DIV ALIGN=center>
+<H3 ALIGN=center>July 31, 2005</H3><DIV ALIGN=center>
<IMG SRC="logo.png">
<LI><A HREF="#htoc16">3.1.4 Shapers Configuration</A>
<LI><A HREF="#htoc17">3.1.5 Listened Sockets</A>
<LI><A HREF="#htoc18">3.1.6 Modules</A>
+<LI><A HREF="#htoc19">3.1.7 Virtual Host Configuration</A>
</UL>
-<LI><A HREF="#htoc19">3.2 Online Configuration and Monitoring</A>
+<LI><A HREF="#htoc20">3.2 Online Configuration and Monitoring</A>
<UL><LI>
-<A HREF="#htoc20">3.2.1 Web-based Administration Interface</A>
-<LI><A HREF="#htoc21">3.2.2 <TT>ejabberdctl</TT> tool</A>
+<A HREF="#htoc21">3.2.1 Web-based Administration Interface</A>
+<LI><A HREF="#htoc22">3.2.2 <TT>ejabberdctl</TT> tool</A>
</UL>
</UL>
-<LI><A HREF="#htoc22">4 Clustering</A>
+<LI><A HREF="#htoc23">4 Clustering</A>
<UL><LI>
-<A HREF="#htoc23">4.1 How it works</A>
+<A HREF="#htoc24">4.1 How it works</A>
<UL><LI>
-<A HREF="#htoc24">4.1.1 Router</A>
-<LI><A HREF="#htoc25">4.1.2 Local Router</A>
-<LI><A HREF="#htoc26">4.1.3 Session Manager</A>
-<LI><A HREF="#htoc27">4.1.4 S2S Manager</A>
+<A HREF="#htoc25">4.1.1 Router</A>
+<LI><A HREF="#htoc26">4.1.2 Local Router</A>
+<LI><A HREF="#htoc27">4.1.3 Session Manager</A>
+<LI><A HREF="#htoc28">4.1.4 S2S Manager</A>
</UL>
-<LI><A HREF="#htoc28">4.2 How to setup ejabberd cluster</A>
+<LI><A HREF="#htoc29">4.2 How to setup ejabberd cluster</A>
</UL>
-<LI><A HREF="#htoc29">A Built-in Modules</A>
+<LI><A HREF="#htoc30">A Built-in Modules</A>
<UL><LI>
-<A HREF="#htoc30">A.1 Common Options</A>
+<A HREF="#htoc31">A.1 Common Options</A>
<UL><LI>
-<A HREF="#htoc31">A.1.1 <TT>iqdisc</TT></A>
-<LI><A HREF="#htoc32">A.1.2 <TT>host</TT></A>
-<LI><A HREF="#htoc33">A.1.3 <TT>hosts</TT></A>
+<A HREF="#htoc32">A.1.1 <TT>iqdisc</TT></A>
+<LI><A HREF="#htoc33">A.1.2 <TT>host</TT></A>
+<LI><A HREF="#htoc34">A.1.3 <TT>hosts</TT></A>
</UL>
-<LI><A HREF="#htoc34">A.2 <TT>mod_announce</TT></A>
-<LI><A HREF="#htoc35">A.3 <TT>mod_configure</TT></A>
-<LI><A HREF="#htoc36">A.4 <TT>mod_disco</TT></A>
-<LI><A HREF="#htoc37">A.5 <TT>mod_echo</TT></A>
-<LI><A HREF="#htoc38">A.6 <TT>mod_irc</TT></A>
-<LI><A HREF="#htoc39">A.7 <TT>mod_last</TT></A>
-<LI><A HREF="#htoc40">A.8 <TT>mod_muc</TT></A>
-<LI><A HREF="#htoc41">A.9 <TT>mod_offline</TT></A>
-<LI><A HREF="#htoc42">A.10 <TT>mod_privacy</TT></A>
-<LI><A HREF="#htoc43">A.11 <TT>mod_private</TT></A>
-<LI><A HREF="#htoc44">A.12 <TT>mod_pubsub</TT></A>
-<LI><A HREF="#htoc45">A.13 <TT>mod_register</TT></A>
-<LI><A HREF="#htoc46">A.14 <TT>mod_roster</TT></A>
-<LI><A HREF="#htoc47">A.15 <TT>mod_service_log</TT></A>
-<LI><A HREF="#htoc48">A.16 <TT>mod_shared_roster</TT></A>
-<LI><A HREF="#htoc49">A.17 <TT>mod_stats</TT></A>
-<LI><A HREF="#htoc50">A.18 <TT>mod_time</TT></A>
-<LI><A HREF="#htoc51">A.19 <TT>mod_vcard</TT></A>
-<LI><A HREF="#htoc52">A.20 <TT>mod_version</TT></A>
+<LI><A HREF="#htoc35">A.2 <TT>mod_announce</TT></A>
+<LI><A HREF="#htoc36">A.3 <TT>mod_configure</TT></A>
+<LI><A HREF="#htoc37">A.4 <TT>mod_disco</TT></A>
+<LI><A HREF="#htoc38">A.5 <TT>mod_echo</TT></A>
+<LI><A HREF="#htoc39">A.6 <TT>mod_irc</TT></A>
+<LI><A HREF="#htoc40">A.7 <TT>mod_last</TT></A>
+<LI><A HREF="#htoc41">A.8 <TT>mod_muc</TT></A>
+<LI><A HREF="#htoc42">A.9 <TT>mod_offline</TT></A>
+<LI><A HREF="#htoc43">A.10 <TT>mod_privacy</TT></A>
+<LI><A HREF="#htoc44">A.11 <TT>mod_private</TT></A>
+<LI><A HREF="#htoc45">A.12 <TT>mod_pubsub</TT></A>
+<LI><A HREF="#htoc46">A.13 <TT>mod_register</TT></A>
+<LI><A HREF="#htoc47">A.14 <TT>mod_roster</TT></A>
+<LI><A HREF="#htoc48">A.15 <TT>mod_service_log</TT></A>
+<LI><A HREF="#htoc49">A.16 <TT>mod_shared_roster</TT></A>
+<LI><A HREF="#htoc50">A.17 <TT>mod_stats</TT></A>
+<LI><A HREF="#htoc51">A.18 <TT>mod_time</TT></A>
+<LI><A HREF="#htoc52">A.19 <TT>mod_vcard</TT></A>
+<LI><A HREF="#htoc53">A.20 <TT>mod_version</TT></A>
</UL>
-<LI><A HREF="#htoc53">B I18n/L10n</A>
+<LI><A HREF="#htoc54">B I18n/L10n</A>
</UL>
<!--TOC section Introduction-->
{mod_version, []}
]}.
</PRE>
+<!--TOC subsubsection Virtual Host Configuration-->
+
+<H4><A NAME="htoc19">3.1.7</A> Virtual Host Configuration</H4><!--SEC END -->
+
+<A NAME="sec:configvirtualhost"></A>
+Options can be defined separately for different virtual hosts using
+<TT>host_config</TT> option. It have the have following syntax:
+<PRE>
+ {host_config, <hostname>, [<option>, <option>, ...]}.
+</PRE>
+Example:
+<PRE>
+{host_config, "example.org", [{auth_method, internal}]}.
+
+{host_config, "example.com", [{auth_method, ldap},
+ {ldap_servers, ["localhost"]},
+ {ldap_uidattr, "uid"},
+ {ldap_rootdn, "dc=localdomain"},
+ {ldap_rootdn, "dc=example,dc=com"},
+ {ldap_password, ""}]}.
+</PRE>
<!--TOC subsection Online Configuration and Monitoring-->
-<H3><A NAME="htoc19">3.2</A> Online Configuration and Monitoring</H3><!--SEC END -->
+<H3><A NAME="htoc20">3.2</A> Online Configuration and Monitoring</H3><!--SEC END -->
<A NAME="sec:onlineconfig"></A>
<!--TOC subsubsection Web-based Administration Interface-->
-<H4><A NAME="htoc20">3.2.1</A> Web-based Administration Interface</H4><!--SEC END -->
+<H4><A NAME="htoc21">3.2.1</A> Web-based Administration Interface</H4><!--SEC END -->
<A NAME="sec:webadm"></A>
To perform online reconfiguration of <TT>ejabberd</TT> you need to enable
<BR>
<!--TOC subsubsection <TT>ejabberdctl</TT> tool-->
-<H4><A NAME="htoc21">3.2.2</A> <TT>ejabberdctl</TT> tool</H4><!--SEC END -->
+<H4><A NAME="htoc22">3.2.2</A> <TT>ejabberdctl</TT> tool</H4><!--SEC END -->
<A NAME="sec:ejabberdctl"></A>
It is possible to do some administration operations using <TT>ejabberdctl</TT>
</PRE>
<!--TOC section Clustering-->
-<H2><A NAME="htoc22">4</A> Clustering</H2><!--SEC END -->
+<H2><A NAME="htoc23">4</A> Clustering</H2><!--SEC END -->
<A NAME="sec:clustering"></A>
<!--TOC subsection How it works-->
-<H3><A NAME="htoc23">4.1</A> How it works</H3><!--SEC END -->
+<H3><A NAME="htoc24">4.1</A> How it works</H3><!--SEC END -->
<A NAME="sec:howitworks"></A>
A Jabber domain is served by one or more <TT>ejabberd</TT> nodes. These nodes can
</UL>
<!--TOC subsubsection Router-->
-<H4><A NAME="htoc24">4.1.1</A> Router</H4><!--SEC END -->
+<H4><A NAME="htoc25">4.1.1</A> Router</H4><!--SEC END -->
This module is the main router of Jabber packets on each node. It
routes them based on their destinations domains. It uses a global
<BR>
<!--TOC subsubsection Local Router-->
-<H4><A NAME="htoc25">4.1.2</A> Local Router</H4><!--SEC END -->
+<H4><A NAME="htoc26">4.1.2</A> Local Router</H4><!--SEC END -->
This module routes packets which have a destination domain equal to
this server name. If destination JID has a non-empty user part, then
<BR>
<!--TOC subsubsection Session Manager-->
-<H4><A NAME="htoc26">4.1.3</A> Session Manager</H4><!--SEC END -->
+<H4><A NAME="htoc27">4.1.3</A> Session Manager</H4><!--SEC END -->
This module routes packets to local users. It searches to what user
resource a packet must be sent via a presence table. Then packet is
<BR>
<!--TOC subsubsection S2S Manager-->
-<H4><A NAME="htoc27">4.1.4</A> S2S Manager</H4><!--SEC END -->
+<H4><A NAME="htoc28">4.1.4</A> S2S Manager</H4><!--SEC END -->
This module routes packets to other Jabber servers. First, it
checks if an opened S2S connection from the domain of the packet
<BR>
<!--TOC subsection How to setup ejabberd cluster-->
-<H3><A NAME="htoc28">4.2</A> How to setup ejabberd cluster</H3><!--SEC END -->
+<H3><A NAME="htoc29">4.2</A> How to setup ejabberd cluster</H3><!--SEC END -->
<A NAME="sec:cluster"></A>
Suppose you already setuped ejabberd on one of machines (<TT>first</TT>), and
<BR>
<!--TOC section Built-in Modules-->
-<H2><A NAME="htoc29">A</A> Built-in Modules</H2><!--SEC END -->
+<H2><A NAME="htoc30">A</A> Built-in Modules</H2><!--SEC END -->
<A NAME="sec:modules"></A>
<!--TOC subsection Common Options-->
-<H3><A NAME="htoc30">A.1</A> Common Options</H3><!--SEC END -->
+<H3><A NAME="htoc31">A.1</A> Common Options</H3><!--SEC END -->
<A NAME="sec:modcommonopts"></A>
The following options are used by many modules, so they are described in
<BR>
<!--TOC subsubsection <TT>iqdisc</TT>-->
-<H4><A NAME="htoc31">A.1.1</A> <TT>iqdisc</TT></H4><!--SEC END -->
+<H4><A NAME="htoc32">A.1.1</A> <TT>iqdisc</TT></H4><!--SEC END -->
<A NAME="sec:modiqdiscoption"></A>
Many modules define handlers for processing IQ queries of different namespaces
</PRE>
<!--TOC subsubsection <TT>host</TT>-->
-<H4><A NAME="htoc32">A.1.2</A> <TT>host</TT></H4><!--SEC END -->
+<H4><A NAME="htoc33">A.1.2</A> <TT>host</TT></H4><!--SEC END -->
<A NAME="sec:modhostoption"></A>
This option explicitly defines hostname for the module which acts as a service.<BR>
</PRE>
<!--TOC subsubsection <TT>hosts</TT>-->
-<H4><A NAME="htoc33">A.1.3</A> <TT>hosts</TT></H4><!--SEC END -->
+<H4><A NAME="htoc34">A.1.3</A> <TT>hosts</TT></H4><!--SEC END -->
<A NAME="sec:modhostsoption"></A>
This option explicitly defines a list of hostnames for the module which acts as
</PRE>
<!--TOC subsection <TT>mod_announce</TT>-->
-<H3><A NAME="htoc34">A.2</A> <TT>mod_announce</TT></H3><!--SEC END -->
+<H3><A NAME="htoc35">A.2</A> <TT>mod_announce</TT></H3><!--SEC END -->
<A NAME="sec:modannounce"></A>
This module adds support for broadcast announce messages and MOTD.
</PRE>
<!--TOC subsection <TT>mod_configure</TT>-->
-<H3><A NAME="htoc35">A.3</A> <TT>mod_configure</TT></H3><!--SEC END -->
+<H3><A NAME="htoc36">A.3</A> <TT>mod_configure</TT></H3><!--SEC END -->
<A NAME="sec:modconfigure"></A>
Options:
</DL>
<!--TOC subsection <TT>mod_disco</TT>-->
-<H3><A NAME="htoc36">A.4</A> <TT>mod_disco</TT></H3><!--SEC END -->
+<H3><A NAME="htoc37">A.4</A> <TT>mod_disco</TT></H3><!--SEC END -->
<A NAME="sec:moddisco"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0030.html">JEP-0030</A> (Service Discovery).<BR>
</PRE>
<!--TOC subsection <TT>mod_echo</TT>-->
-<H3><A NAME="htoc37">A.5</A> <TT>mod_echo</TT></H3><!--SEC END -->
+<H3><A NAME="htoc38">A.5</A> <TT>mod_echo</TT></H3><!--SEC END -->
<A NAME="sec:modecho"></A>
This module acts as a service and simply returns to sender any Jabber
</DL>
<!--TOC subsection <TT>mod_irc</TT>-->
-<H3><A NAME="htoc38">A.6</A> <TT>mod_irc</TT></H3><!--SEC END -->
+<H3><A NAME="htoc39">A.6</A> <TT>mod_irc</TT></H3><!--SEC END -->
<A NAME="sec:modirc"></A>
This module implements IRC transport.<BR>
</PRE>
<!--TOC subsection <TT>mod_last</TT>-->
-<H3><A NAME="htoc39">A.7</A> <TT>mod_last</TT></H3><!--SEC END -->
+<H3><A NAME="htoc40">A.7</A> <TT>mod_last</TT></H3><!--SEC END -->
<A NAME="sec:modlast"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0012.html">JEP-0012</A> (Last Activity)<BR>
</DL>
<!--TOC subsection <TT>mod_muc</TT>-->
-<H3><A NAME="htoc40">A.8</A> <TT>mod_muc</TT></H3><!--SEC END -->
+<H3><A NAME="htoc41">A.8</A> <TT>mod_muc</TT></H3><!--SEC END -->
<A NAME="sec:modmuc"></A>
This module implements <A HREF="http://www.jabber.org/jeps/jep-0045.html">JEP-0045</A> (Multi-User Chat) service.<BR>
</PRE>
<!--TOC subsection <TT>mod_offline</TT>-->
-<H3><A NAME="htoc41">A.9</A> <TT>mod_offline</TT></H3><!--SEC END -->
+<H3><A NAME="htoc42">A.9</A> <TT>mod_offline</TT></H3><!--SEC END -->
<A NAME="sec:modoffline"></A>
This module implements offline message storage.<BR>
<BR>
<!--TOC subsection <TT>mod_privacy</TT>-->
-<H3><A NAME="htoc42">A.10</A> <TT>mod_privacy</TT></H3><!--SEC END -->
+<H3><A NAME="htoc43">A.10</A> <TT>mod_privacy</TT></H3><!--SEC END -->
<A NAME="sec:modprivacy"></A>
This module implements Privacy Rules as defined in XMPP IM
</DL>
<!--TOC subsection <TT>mod_private</TT>-->
-<H3><A NAME="htoc43">A.11</A> <TT>mod_private</TT></H3><!--SEC END -->
+<H3><A NAME="htoc44">A.11</A> <TT>mod_private</TT></H3><!--SEC END -->
<A NAME="sec:modprivate"></A>
This module adds support of <A HREF="http://www.jabber.org/jeps/jep-0049.html">JEP-0049</A> (Private XML Storage).<BR>
</DL>
<!--TOC subsection <TT>mod_pubsub</TT>-->
-<H3><A NAME="htoc44">A.12</A> <TT>mod_pubsub</TT></H3><!--SEC END -->
+<H3><A NAME="htoc45">A.12</A> <TT>mod_pubsub</TT></H3><!--SEC END -->
<A NAME="sec:modpubsub"></A>
This module implements <A HREF="http://www.jabber.org/jeps/jep-0060.html">JEP-0060</A> (Publish-Subscribe Service).<BR>
</PRE>
<!--TOC subsection <TT>mod_register</TT>-->
-<H3><A NAME="htoc45">A.13</A> <TT>mod_register</TT></H3><!--SEC END -->
+<H3><A NAME="htoc46">A.13</A> <TT>mod_register</TT></H3><!--SEC END -->
<A NAME="sec:modregister"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0077.html">JEP-0077</A> (In-Band Registration).<BR>
</PRE>
<!--TOC subsection <TT>mod_roster</TT>-->
-<H3><A NAME="htoc46">A.14</A> <TT>mod_roster</TT></H3><!--SEC END -->
+<H3><A NAME="htoc47">A.14</A> <TT>mod_roster</TT></H3><!--SEC END -->
<A NAME="sec:modroster"></A>
This module implements roster management.<BR>
</DL>
<!--TOC subsection <TT>mod_service_log</TT>-->
-<H3><A NAME="htoc47">A.15</A> <TT>mod_service_log</TT></H3><!--SEC END -->
+<H3><A NAME="htoc48">A.15</A> <TT>mod_service_log</TT></H3><!--SEC END -->
<A NAME="sec:modservicelog"></A>
This module adds support for logging of user packets via any jabber service.
</PRE>
<!--TOC subsection <TT>mod_shared_roster</TT>-->
-<H3><A NAME="htoc48">A.16</A> <TT>mod_shared_roster</TT></H3><!--SEC END -->
+<H3><A NAME="htoc49">A.16</A> <TT>mod_shared_roster</TT></H3><!--SEC END -->
<A NAME="sec:modsharedroster"></A>
This module implements shared roster groups support.<BR>
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
<!--TOC subsection <TT>mod_stats</TT>-->
-<H3><A NAME="htoc49">A.17</A> <TT>mod_stats</TT></H3><!--SEC END -->
+<H3><A NAME="htoc50">A.17</A> <TT>mod_stats</TT></H3><!--SEC END -->
<A NAME="sec:modstats"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0039.html">JEP-0039</A> (Statistics Gathering).<BR>
</DL>
<!--TOC subsection <TT>mod_time</TT>-->
-<H3><A NAME="htoc50">A.18</A> <TT>mod_time</TT></H3><!--SEC END -->
+<H3><A NAME="htoc51">A.18</A> <TT>mod_time</TT></H3><!--SEC END -->
<A NAME="sec:modtime"></A>
This module answers UTC time on <TT>jabber:iq:time</TT> queries.<BR>
</DL>
<!--TOC subsection <TT>mod_vcard</TT>-->
-<H3><A NAME="htoc51">A.19</A> <TT>mod_vcard</TT></H3><!--SEC END -->
+<H3><A NAME="htoc52">A.19</A> <TT>mod_vcard</TT></H3><!--SEC END -->
<A NAME="sec:modvcard"></A>
This module implements simple Jabber User Directory (based on user vCards)
</PRE>
<!--TOC subsection <TT>mod_version</TT>-->
-<H3><A NAME="htoc52">A.20</A> <TT>mod_version</TT></H3><!--SEC END -->
+<H3><A NAME="htoc53">A.20</A> <TT>mod_version</TT></H3><!--SEC END -->
<A NAME="sec:modversion"></A>
This module answers <TT>ejabberd</TT> version on <TT>jabber:iq:version</TT> queries.<BR>
</DL>
<!--TOC section I18n/L10n-->
-<H2><A NAME="htoc53">B</A> I18n/L10n</H2><!--SEC END -->
+<H2><A NAME="htoc54">B</A> I18n/L10n</H2><!--SEC END -->
<A NAME="sec:i18nl10n"></A>
All built-in modules support <TT>xml:lang</TT> attribute inside IQ queries.