For the best user experience, it is recommended that a port be opened (default is 18001) to the server running the ChatBlazer server. This tutorial serves those whose network environment is beyond their control, or expect a significant portion of their users to be within strict firewalls with restrictive access.
Checking HTTP Connector is enabled
Check the server configuration, conf.xml for this line.
- Code: Select all
<http-connector host="" port="18008" context="/cb8app" path="/http"/>
This specifies the URL to be used for using the HTTP Connector. Based on the above, the URL should be:
http://yourdomain:18008/cb8app/http
Assuming port 18008 is opened, try accessing the URL directly in your browser, i.e. type the URL into the browser's address bar. You should see an output like this.
- Code: Select all
HttpConnector (1.0.005)
It's not very useful to have the port 18008 specifier in the URL as it is likely to be rendered the same fate as connecting directly due to firewalls. The following section will show you how to integrate the HTTP Connector with your web server.
Integration with web server
Apache 2.0, 2.2
This section shows you how to have the Apache web server proxy HTTP requests to the HTTP Connector.
Add the following to the Apache configuration (httpd.conf) :
- Code: Select all
ProxyPass /cb8app/ http://localhost:18008/cb8app/
ProxyPassReverse /cb8app/ http://localhost:18008/cb8app/
(You can add the lines on a global level, or specific to one of your virtual hosts section.)
Restart Apache and try the above URL, now without the 18008 port specifier. E.g.
http://yourdomain/cb8app/http
If the URL opens in your browser, it means the chat client is able to connect using this URL. The client configuration (config.xml) already uses "/cb8app/http" as its default value.
Tip! If you will not be using the direct connection method, you can omit the port parameter inside config.xml so that it will immediately use the HTTP connection method instead of trying the direct connection first.
- Code: Select all
<socket host="" port="" timeout="15000" />
