Hostnames
Prev | Chapter 20. Old Way - Editing Configuration File Manually | Next

## Hostnames

This one might be a little bit more tricky than previous as hostnames setting has to be changed in a few places. Don’t ask why now as this is a "Short Configuration Guide", you remember. Here we focus on how not on why.

You have to search configuration file for string "hostnames". There are more than one such sections and you have to find ALL sections looking like:

    <entry type="String[]" key="hostnames">
        <item value="your.hostname.com"/>
        <item value="localhost"/>
    </entry>

It may also look like:

    <entry type="String[]" key="hostnames">
        <item value="localhost"/>
    </entry>

Depending how successful was mechanism for automatic hostname detection. It of course does not depends on your luck. It depends on network configuration on your server.

The first form is more useful as it includes also hostname recognized in network environment. If it is correct then you can just leave it as it is. If it is incorrect you have to change it. Please remember, if you want your server to be able to communicate with other Jabber/XMPP servers the hostname you put there must resolve in DNS to your Jabber server machine IP address. In other words. If you try to connect from the Internet to machine with this hostname the connection should reach your Jabber server.

And remember your Jabber server users' JIDs (Jabber IDs) can include only those hostnames which are included in the configuration. So for our case you can use only JIDs: "user2@your.hostname.com", "user1@your.hostname.com" and so on.

If you server have more Internet addresses (virtual domains) assigned to it your Jabber server can use them all. So your configuration may look like:

    <entry type="String[]" key="hostnames">
        <item value="your.hostname.com"/>
        <item value="clien1.hostname.com"/>
        <item value="another.hostname.com"/>
        <item value="jabber.sample-domain.com"/>
        <item value="jabber.some-project.org"/>
        <item value="localhost"/>
    </entry>

In such case users' JIDs on your Jabber server may include any of defined above domains like: "user1@your.hostname.com", "user1@clien1.hostname.com", "user1@jabber.sample-domain.com". Each of these 3 sample JIDs refer to different user account.

Your server will accept connections only for domains defined in configuration file.

In majority cases it does not matter whether you leave "localhost" or remove it. It is sometimes better to leave it though. So if you are not sure if you can remove it in your environment just leave it as is.

Prev | Up | Next
Chapter 20. Old Way - Editing Configuration File Manually | Home | Logs