Tags:
create new tag
view all tags

APPX HTML Client 5.4.3/5.4.4

This page gives installation instructions and an overview of the Appx HTML client.


Overview

The Appx HTML client is designed to allow you to connect to an Appx server and run Appx applications using a browser, either on the desktop, a tablet or a smartphone. When running the client in a browser, no software is required on the desktop, tablet or smart phone. When the user logs on, the necessary code is downloaded to their device as required.

In this release, you can only run the applications, you cannot design them. Specifically, the ILF editor, old ILF Debugger and Image Editor are not supported. You may be able to work in Application Design so long as you avoid those.

The client will support SSL connections if your web server is configured appropriately. If not, the client will use its own built in AES encryption but be aware that this is not sufficient to protect sensitive data.

The Appx HTML client consists of two modules:

  • Web Server Files (webhost.zip). These are the javascript libraries and style sheets that make up the HTML client. This also contains the Local Connector for Windows, Mac and Linux clients. These must be installed in your web server's document directory.
  • APPX Server connector (serverConnector.zip). This is a javascript library that connects the client running in your browser to the actual Appx engine. In releases prior to 5.4.4 the Appx Server Connector is platform specific, you will need the one that matches the O/S under which your server is running. After Release 5.4.4 it is platform independant.
Note that Appx does not have to be running on the same server as your web server, and the APPX Server Connector does not have be on the same server as either Appx or your web server. This gives you maximum flexibility in configuring your installation.

Once the HTML client is working, you can connect to any Appx 5.4+ server, just as you can with the Appx Desktop Client. Due to the engine changes that were made in 5.4 to support the HTML client, you cannot connect to an earlier Appx engine.

Prerequisites

The server that will run the APPX Server Connector requires 'nodejs' (https://nodejs.org/). In Release 5.4.4 and higher you also need the Mongo Database (https://www.mongodb.org/). See below for details on installing these packages.

Local Connector

Because of the tighter security in web browsers, it is not possible for HTML 5/javascript to seamlessly upload, download or open files unassisted on the users desktop the way it can be done with the Appx Desktop Client. To address this, the HTML client includes a small 'helper' program that supports this. This is called the 'LocalConnector'. By default, the HTML client will check to see if the local connector program is running when the user logs in. If it is not running, it will offer to install it, and if the user cancels they will be nagged the next time they log in.

If your application does not require the ability to upload/download/open files on the desktop, you can turn this off (see Installation below).

There is a 'Connectivity' indicator in the lower right corner of the browser window with the words 'Remote' and 'Local'. If 'Local' is in green with a "+", it means the local connector is installed & running. Red means the connector is not installed. The 'Remote' connector refers to the connection to the Appx Server Connector. This must be green with a "+" for any connection to work.

Differences between ADC and HTML Clients

The HTML client has a different presentation for most non-Appx elements such as Date Choosers, File Upload/download dialog boxes, Tables, etc. The goal of the HTML client was to replicate the presentation of your screens as accurately as possible as far as the Appx elements are concerned (i.e., the widgets and fields you use in the Image Editor). Since we use different 3rd party tools and runtimes for other elements, they will look different compared to the Appx Desktop Client.

Requirements

You will need a web server, either Linux or Windows based. If you are going to use the Apache web server and you want to use a forwarding proxy, it must be version 2.4 or higher. We have tested IIS on Win 7 with success, earlier versions of IIS have not been tested.

The web server does not have to be on the same server as Appx.

If you plan to use an SSL connection, your web server must be configured to accept both SSL and non-SSL connections.

If you are going to run the APPX Server Connector on a Windows server, make sure all patches have been applied. In particular, https://support.microsoft.com/en-us/kb/2731284 will break tables if it is not applied

We have tested the HTML client on current versions of IE, Chrome, Firefox and Safari.

Installation - Web Server Component

1) Extract the Web Server File (webhost.zip) into the document folder for your web server. Depending on your web site layout, you may want to put this in its own folder within the web server documents, i.e., /var/www/html/appx.

2) Set the name of the host running the Appx Server Connector in the 'client.html' web page:

<meta name="appx-proxy-host" content="HOSTNAME"> <!-- Server Connector hostname or web server if tunneling -->

Change HOSTNAME to the name or IP address of the server running the Appx Server Connector. Do not use localhost.

Installation - APPX Server Connector Component

The APPX Server Connector is the software that connects the HTML clients and the APPX server. This can be installed on the same server as the web server, or the APPX Server, or a completely different machine. If you are not using tunnneling via the web server, then port 3014 (the default port) needs to be open between the server connector machine and your HTML clients.

Prerequisites

All releases of the APPX Server Connector require the 'nodejs' package from https://nodejs.org/. For rpm based Linux systems, you can install it via (as root):

curl --silent --location https://rpm.nodesource.com/setup | bash -yum install nodejs


To install on Windows, go to https://nodejs.org and download the Windows installer (msi) file and simply run the installer.

As of Release 5.4.4 the APPX Server Connector also requires the MongoDB Database for caching images and other items. Instructions for downloading and configuring the database can be found at https://docs.mongodb.org/manual/tutorial/

Installation

1) Extract the Appx Server Connector to a location of your choice. A folder in the /opt directory would be a good choice on a Linux server. Once the software is extracted, run the appxConnector-install.js script. This should be run as 'root' on Linux/Unix systems, and as an Administrator on Windows systems. This will check your system for the required modules. To run the script, open a terminal or DOS window and navigate to the folder where you installed the Appx Server Connector, then invoke the script via 'node':

[root@localhost ~]# cd /opt/appxConnector543
[root@localhost appxConnector543]# node appxConnector-install.js
Checking for required modules...
Module: crypto - Installed.
Module: fs - Installed.
Module: hexy - Installed.
Module: http - Installed.
Module: https - Installed.
Module: mongodb - Installed.
Module: net - Installed.
Module: node-cryptojs-aes - Installed.
Module: string - Missing, please run 'npm install string' to install.
Module: string_decoder - Installed.
Module: url - Installed.
Module: ws - Installed.

Missing modules. Please install required modules and run again.

Notice in this example the module 'string' is missing and the instructions on how to install it are displayed. If any modules are missing on your system, run the appropriate 'npm' command to install them, then re-run the install script. If all modules are present, the service will be created:

[root@localhost appxConnector543]# node appxConnector-install.js  
Checking for required modules...
Module: crypto - Installed.
Module: fs - Installed.
Module: hexy - Installed.
Module: http - Installed.
Module: https - Installed.
Module: mongodb - Installed.
Module: net - Installed.
Module: node-cryptojs-aes - Installed.
Module: string - Installed.
Module: string_decoder - Installed.
Module: url - Installed.
Module: ws - Installed.

Installing appxconnector service...
Using default mode: systemd Installing service on /etc/systemd/system/appxconnector.service
Already installed, restarting appxconnector service...
Running systemctl start appxconnector...
Done

2) Confirm the service is running. In Linux/Unix you can use 'ps -ef|grep appxConnector.js', and in Windows you can use the 'Services' control panel.

Assuming the web server to which we installed the client is 192.168.0.15, and that we installed everything into an 'appx' folder on the web server, then we should be able to get a client login dialog box via:

http://192.168.0.15/appx/client.html

You must open port 3014 on the server running the APPX Server Connector for this connection to work. If you do not want to open any new ports on your firewall, see the section on 'Tunneling/Forwarding'.

Upgrading an existing HTML client installation

If you are upgrading an existing HTML client installation, the procedure is similar to installation except:

  • it is not necessary to run the 'appxConnector-install.js' script. Simply stop the appxConnector service, install the new files, and restart the appxConnector service.
  • if you have customized 'client.html' you will have to re-do your customizations as it will be replaced when the new files are installed.
  • if you have created your own login page based on the standard 'client.html', compare your page and the standard 'client.html' for any changes that might be required.

LocalConnector

As mentioned above, you can suppress the requirement for the LocalConnector by changing the following line in "client.html":

<meta name="appx-local-required" content="true" >

Change the "true" to "false" to supress the requirement.

LocalConnector Installation

If you do not turn off the LocalConnector requirement as above, then when the 'client.html' page is loaded it will check to see if the local connector is running on the users desktop. If not, they will get a dialog box offering to download the local connector. The actual installation of the local connector varies by the O/S on the user's desktop:

  • Windows: Once the download is complete, run the installer. The local connector will be installed, started and Windows will be configured to automatically start on a reboot. No further action is required.
  • Mac O/S: Once the download is complete, open the disk image and double click the installer. The local connector will be installed and started. The local connector will have to manually started after each login by opening a terminal window and entering the command "cd AppxLocalConnector;open node-webkit.app". Alternatively, the user can add 'node-webkit.app' in their AppxLocalConnector folder to their Login Items in System Preferences.
  • Linux: Once the download is complete, open a terminal window and enter:
    • cd Downloads (or wherever the file was saved to)
    • sh LocalConnector _linux32.sh or sh LocalConnector _linux64.sh, depending on whether you have 32 or 64 bit Linux. The connector will be installed.
    • Start the connector running by:
      • cd $HOME/AppxLocalConnector
      • sh ./start-nw.sh
    • The user has to manually start the local connector every time they log in, or they can add the script to their programs that start automatically when they log in. The steps vary by Linux distribution, consult your documentation.

Tunneling/Forwarding

If you do not want to open port 3014 and would rather use port 80, you can use forwarding instead. For example, to configure Apache 2.4 on Linux you would do the following:

  • In /etc/httpd/conf.modules.d/00-proxy.conf, add (if not already loaded):

    LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

  • In Releases prior to 5.4.4, create the /etc/httpd/conf.d/appx.conf file with the following lines (or just add these to httpd.conf):

    ProxyPass "/appxws" "ws://localhost:3014"
    ProxyPass "/appxwss" "wss://localhost:3014"

  • In Releases to 5.4.4 and greater, create the /etc/httpd/conf.d/appx.conf file with the following lines (or just add these to httpd.conf):

    ProxyPass "/appxwss" "wss://localhost:3014"
    ProxyPassReverse "/appxwss" "wss://localhost:3014"
    ProxyPass "/appxws" "ws://localhost:3014"
    ProxyPassReverse "/appxws" "ws://localhost:3014"

    ProxyPass "/appxhttps" "https://localhost:3014"
    ProxyPassReverse "/appxhttps" "https://localhost:3014"
    ProxyPass "/appxhttp" "http://localhost:3014"
    ProxyPassReverse "/appxhttp" "http://localhost:3014"

  • Change 'client.html' settings to:

    appx-proxy-host = hostname of httpd server (i.e., 192.168.1.11)
    appx-proxy-port = “80"
    appx-proxy-path = /appxws/
    appx-encryption = “aes”

  • Restart your web server

NOTE: If you are running selinux security on your server, you will have to configure it so that apache can initiate an outgoing network connections to the web socket server port. Use the following command:

# setsebool -P httpd_can_network_connect 1

SSL

If you are running a secure web server (https), you can configure the Appx HTML client to use your SSL connection. Your web server must to configured to accept both SSL (https:) and non-SSL (http:) connections.

Change your "client.html" settings as follows (this file is located on your web server):

appx-proxy-host = hostname of httpd server (i.e., 192.168.1.11)
appx-proxy-port = “443"
appx-proxy-path = /appxwss/
appx-encryption = “ssl”

Change your "appxConnector.js" as follows (this file is located on your APPX Server Connector server):

var sslEnabled = true;

For Unix/Linux hosts
var sslPrivateKey = "/etc/pki/tls/private/example.key";
var sslCertificate = "/etc/pki/tls/certs/example.com.crt";
var sslCertAuthority = "/etc/pki/tls/certs/gd_bundle.crt";

For Windows hosts
var sslPrivateKey = "c:\\appx\\SSL\\example.key";
var sslCertificate = "c:\\appx\\SSL\\example.crt";
var sslCertAuthority = "c:\\appx\\SSL\\gd_bundle.crt"

The SSL key values above are examples, you will need to change the file paths to point to your own SSL certificates.

Once you have made the above changes, restart the Server Connector and refresh the Appx Login page in your browser (if it was still loaded when you made these changes).

NOTE: You still use 'http://' to connect to the client page. The client will switch to the SSL connection once the page is loaded.

Styles

Many aspects of the presentation of the Appx Client are controlled by the APPX.css style sheet in the 'css' folder. If you are familiar with working with style sheets, feel free to experiment with different settings, however those changes will be lost the next time the client is updated.

Instead, you can add a CUSTOM.css style sheet with your own settings. This should be located in the same folder as APPX.css and will override the standard settings in the HTML client. For example:

input {

background-color: pink;

}

.appxbox {

background-color: white;

}

This will set the background color of edittable fields to 'pink' and the default background color to 'white'.

Styles by website (5.4.4.1 HTML Client & up only)

It is possible to have different CUSTOM.css style sheets. Install the client web server files as normal, then follow these steps:

  • create sub folders for each of the different style sheets you want to use.
  • Edit the client.html file, changing 'appx-client-root' to point to the parent folder, i.e.:
    • <meta name="appx-client-root" content="..">
  • Copy the client.html file to each subfolder.
  • Create a 'css' folder in each subfolder, and put each unique CUSTOM.css file in that folder

Troubleshooting

  • If you have created your own login page based on 'client.html', make sure you update it with any changes to the standard 'client.html' when upgrading the HTML client.
  • If the client login dialog box does not display, check your web server error logs for any error messages & correct as required.
  • If you are getting "[proxy:error] [pid xxxx] (13)Permission denied:" errors, you might have a selinux security issue that prevents apache from initiating any outgoing network connections to the web socket server port. In that case, try the following command:
    # setsebool -P httpd_can_network_connect 1
  • Some browsers (like IE) will not run the client successfully if you double click the 'client.html' file. You should always access the web page via http://servername/client.html, even if the page is installed on your local system.
  • Check to make sure your Appx Server Connector is still running. If not, restart it.
  • If you can't display table data inside a browser and you are running Windows Server 2008R2, you might try installing this HOTFIX from Microsoft. Windows 2008R2 servers without that HOTFIX will sometimes zero-out the MongoDB data. https://support.microsoft.com/en-us/kb/2731284
  • If you're having trouble with Remote connections, this page has some tips
  • If the client seems to hang while loading images or tables, that its a very good indicator that MongoDB server has stopped. If MongoDB server needs to be started or restarted then make sure you restart the appxConnector service after MongoDB is running.

Comments

Read what other users have said about this page or add your own comments.



-- JeanNeron - 2015-12-18

Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r19 - 2016-10-20 - JoeOrtagus
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback