ejabberd - Comments for "definition of a virtual host?" https://www.ejabberd.im/node/3617 en The ejabberd Guide says: > https://www.ejabberd.im/node/3617#comment-54666 <p>The ejabberd Guide says:</p> <p>&gt; The option 'hosts' defines a list containing one or more domains that ejabberd will serve.</p> <p>Let's imagine you control example.org, and you have an HTTP server listening in port 80 for the domain <noindex><a href="http://www.example.org" title="www.example.org" rel="nofollow" >www.example.org</a></noindex>. Now you want a Jabber server listening for client connections in port 5222 for the domain jabber.example.org. Just put in ejabberd.cfg</p> <pre>{hosts, ["jabber.example.org"]}.</pre><p> Many people prefer to server HTTP in the domain example.org, and Jabber on the domain example.org. No problem, just put</p> <pre>{hosts, ["example.org"]}.</pre><p>but make sure that you setup correctly the DNS or DNS SRV stuff.</p> <p>In my case i just tested with:</p> <pre> $ telnet localhost 5222 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. testest &lt;?xml version='1.0'?&gt; ... Connection closed by foreign host. </pre> Sat, 19 Sep 2009 08:50:42 +0000 mfoss comment 54666 at https://www.ejabberd.im hostname = domain name, and other confusions https://www.ejabberd.im/node/3617#comment-54660 <p>What confuses me the most about ejabberd (and maybe all jabber server implementations) is the server hostname configuration. I don't understand how a domain name can be a hostname. The only way I've been able to work-around this confusion is by actually using serverhostname.domain instead of just our domain name.</p> <p>Otherwise, wireshark traces show our Perl scripts getting the stream error 'unknown-host', which essentially means that the to=&gt; attribute isn't something the server understands (because the SERVED HOSTNAME for the server is a domain name I assume).</p> <p>Using Net-Jabber ... How could this possibly work?</p> <p>$C-&gt;Connect( hostname =&gt; company-name.com,<br /> port =&gt; 5222 );</p> <p>- the hostname is a domain name? Huh? All the Net-Jabber examples show a domain name as the hostname value.<br /> - this method didn't work at all of course (there's no server name specified. who is the client trying to talk to?).</p> <p>The solution was to do something like this:</p> <p>$C-&gt;Connect( hostname =&gt; SERVER-HOST-NAME.company-name.com,<br /> port =&gt; 5222 );</p> <p>And change the config file to something other than what all the examples show.</p> <p>%%%. ================<br /> %%%' SERVED HOSTNAMES<br /> %% Admin user<br /> {acl, admin, {user, "jabberadmin", "jabber-test-server.[company].com"}}.</p> <p>%%<br /> %% hosts: Domains served by ejabberd.<br /> %% You can define one or several, for example:<br /> %% {hosts, ["example.net", "example.com", "example.org"]}.<br /> %%<br /> {hosts, ["jabber-test-server.[company].com"]}.</p> <p>Why are Net-Jabber and sendxmpp so confused? After solving this issue with the solution shown above, I am now running into a new issue with both Net-Jabber and sendxmpp which is that neither of them can handle digest-uri authentication (they both send "/" which the server doesn't like).</p> <p>I guess my question is: why do all Net-Jabber and ejabberd.cfg examples show using just a domain name and port to talk-to/identify the server name? And, are there any modern command line tools or Perl modules that can handle ejabberd's digest-uri SASL authentication?</p> <p>Thanks,</p> <p>Jay</p> Thu, 17 Sep 2009 17:22:17 +0000 jsplaine comment 54660 at https://www.ejabberd.im > would you refer to https://www.ejabberd.im/node/3617#comment-54566 <p>&gt; would you refer to "bar.com" and "baz.com" as virtual hosts, or just hosts?</p> <p>Both terms are used as synonims in ejabberd code, and in ejabberd documentation.</p> <p>If you set in ejabberd.cfg:</p> <pre>{hosts, ["server1.com", "server2.com", "server3.com"]}.</pre><p>ejabberd considers there are 3 virtual hosts. They are sometimes also called 'hosts' for brevity in the documentation. All three are identical.</p> Mon, 24 Aug 2009 10:18:14 +0000 mfoss comment 54566 at https://www.ejabberd.im