How to install IN AMAZON EC2 and DNS in OVH

Skip to first unread message


Mar 14, 2011, 8:10:58 PM3/14/11
to onesocialweb
This Guide is already test and is a update of any other wiki. The
instructions can work in any other servers is not amazon

1.- Login in your AWS console and Install any AMI with UBuntu 10.04 or
any Debian version

2.- Install Openfire
Ensure java6 is installed
sudo apt-get install sun-java6-jdk
Download openfire
Install Openfire
sudo dpkg -i openfire_3.6.4_all.deb
Ensure that the relavent ports are open (9090 HTTP, 9091 HTTPS,
5222-5223 TCP/IP)
5269 is used for federated server to server messages
Configure on port 9090 from a web browser
Ensure that the port is able to accept connections from
Note: For added security, it is suggested not to open the admin port
(9090, 9091).
Restart Openfire
sudo service openfire restart
Login to the Admin Control Panel
You should be now able to login to the admin control panel on port
If you can’t login to the Admin Control Panel, there seems to be a
known error where the admin account created during the setup process
doesn’t work. You can fix this by following the instructions in – please
note that the config files live in /usr/share/openfire/conf/
Install One Social Web
Download from ( ) –
you will need to unpack the tar.gz or tgz file you downloaded before
you can upload it to the server.
- Open the openfire admin panel (http://localhost:9090)
- Go to the Plugins page
- Upload the osw-openfire-plugin.jar file
- If you check the info log (Server Manager → Logs → Info) you should
see the message
“OneSocialWeb plugin has been loaded”

in OVH or in your domain provider MAKE THE SUBDOMAIN YOU GO TO USE
For that you need to create a CNAME record example: CNAME

Now we need to create the mapping_xmpp
First we delete any record show mapping_xmpp
and we ADD a new CNAME record like that: CNAME

Enable HTTP binding in your Openfire server:
Login to the admin console
Go to Server Settings → HTTP Binding
Check the Enabled box
Write down the port number, it should be 7070
Unpack the web client in a folder accessible to your web server:
$ cd /var/www
$ wget
$ tar -zxvf osw-web-0.6.0a.tgz
$ mv osw-web-0.6.0a onesocialweb
Edit the index.html file and update your preferences. Here are the
preferences that matches the example in this tutorial:
var preferences = {

// It is easy to change the styling of this client, just point this
variable to another
// theme folder
theme_folder: "themes/osw/",

// What name to use when presenting this service to the user
service_name: "OneSocialWeb",

// The XMPP server to which this client can connect over BOSH.
Carefull that most browsers
// won't allow connecting to a host which is not the same as the one
serving these pages
bosh_host: "",

// Absolute path to the BOSH endpoint
bosh_path: "/bosh",

// What the XMPP domain is
xmpp_domain: "",

// Absolute path to the file servlet
upload_endpoint: "/file",
file_retrieval_endpoint: "",

// If true, we may do a bit more of logging
developer_mode: "false"


Using the Apache web server
Add a new site to your Apache configuration and setup the proxy
redirect to your Openfire BOSH server. You can simply create a new
file (onesocialweb) in /etc/apache2/sites-available/ using the
following content as a basis and modifying pathes and server names to
match your configuration.
Warning: Do not mess-up with your Proxy configuration. If you mis
configure your server, it could act as a proxy for any clients on the
internet towards any other site. In case of doubts, check the
mod_proxy documentation
A good practice is to always have * ProxyRequests* directive to Off.


<VirtualHost *:80>
DocumentRoot /var/www/onesocialweb


<Directory /var/www/onesocialweb>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/onesocialweb_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/onesocialweb_access.log combined
ServerSignature On

<Proxy *>
Order Allow,Deny
Allow from all

if we see We not configure the Proxy inside of VirtualHost
We go to make the configuration inside of proxy.conf With that we get
less complications
For not bidding to all the domains we change for the domain
name we like to use
proxy.conf is in /etc/apache2/mods-enabled
if you not see proxy.conf make at root:
sudo a2enmod proxy
sudo a2enmod proxy_http

we open the file proxy.conf and we make like is here

<IfModule mod_proxy.c>
<Proxy *>
#AddDefaultCharset off
Order allow,deny
Allow from all
#Allow from
ProxyRequests Off
ProxyTimeout 900
ProxyPass /bosh
ProxyPassReverse /bosh
ProxyPass /file
ProxyPassReverse /file
ProxyPass http-bind/
ProxyPassReverse /http-bind

------------------------------AFTER THAT-------

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2ensite onesocialweb
sudo /etc/init.d/apache2 restart

Reply all
Reply to author
0 new messages