Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 018f4fb309
Fetching contributors…

Cannot retrieve contributors at this time

81 lines (52 sloc) 2.269 kb

Setting up XMPP

Setup ejabberd

Mac

Obtain the dmg installer and run it.

Linux

Use your preferred package manager to install erlang and related dependencies. Then install ejabberd version 2.0 or greater. You can use a package manager or build from source.

sudo vi /etc/ejabberd/ejabberd.cfg 

and modify the following:

{acl, admin, {user, "myadmin_username_here", "localhost"}}.

then add the user via the command-line:

sudo /etc/init.d/ejabberd start
sudo ejabberdctl register myadmin_username_here localhost myadmin_password_here
sudo /etc/init.d/ejabberd restart

Browse to http://localhost:5280/admin to verify the server is running.

Now we need to setup http binding.

sudo vi /etc/ejabberd/ejabberd.cfg

Add the following to the modules section:

{mod_http_bind, []}

Add the http_bind service

{5280, ejabberd_http, [
                        http_poll,
                        web_admin,
                        http_bind
                      ]}

Restart the ejabberd server and browse to http://localhost:5280/http-bind/ to verify the service is running.

References:

Modify web server for proxy pass

Nginx

Add the following under a server entry in the nginx conf file.

location /http-bind {
  proxy_pass http://localhost:5280/http-bind;
  proxy_read_timeout 300;
}

Apache

Add the following to the httpd.conf

<VirtualHost *>
  Servername example.com
  DocumentRoot /path/to/site/root
  AddDefaultCharset UTF-8
  RewriteEngine On
  RewriteRule ^/http-bind http://localhost:5280/http-bind [P]
</VirtualHost>

Make sure the following lines are uncommented

LoadModule rewrite_module     libexec/httpd/mod_rewrite.so
LoadModule proxy_module       libexec/httpd/libproxy.so
AddModule mod_rewrite.c
AddModule mod_proxy.c

It may be necessary to add the ProxyTimeout directive to the Apache configs though the value should be 300 by default.

Jump to Line
Something went wrong with that request. Please try again.