.
Eloquence WEBDLG2 contact contact

Documentation / WEBDLG2 / Using an external web server

Using an external web server

 
.
  Document revision: 2024-10-28
Refers to WEBDLG2 version: B0840 2409-1


Table of contents


WEBDLG2 allows to choose between using the eloqwebd2 internal web server and an external web server, e.g., Apache httpd.

Possible reasons for preferring to use an external web server could be, among others:

  • A web server is already configured and running on the system.

  • Existing Eloquence JDLG applications are used in parallel to WEBDLG2, or are going to be migrated to WEBDLG2 step by step. These applications already use an existing web server.

  • Functionality is required which the eloqwebd2 internal web server does not provide, for example to serve active content such as PHP applications and/or CGI programs.


When using an external web server, e.g., Apache httpd, on the same system with the eloqwebd2, the web server typically occupies the default HTTP port 80 and/or the default HTTPS port 443.

As a consequence, the eloqwebd2 needs to be configured to a different port, for example:

ServiceHTTP = 8188
ServiceHTTPS = 8188

As shown in the example above, both ServiceHTTP and ServiceHTTPS may be set identically, the eloqwebd2 then automatically detects whether to use HTTP or HTTPS.

Please note: If the web server is configured for HTTPS, the eloqwebd2 should be configured for HTTPS as well. Otherwise the web browser may refuse to open WEBDLG2 WebSocket connections due to its security policy.


The WEBDLG2 user interface is represented by HTML documents containing the WEBDLG2 client JavaScript code and CSS rules.

The WEBDLG2 client JavaScript and CSS documents are installed in the htdocs subdirectory below the Eloquence share/webdlg2 directory:

HP-UX, Linux
/opt/eloquence/8.4/share/webdlg2/htdocs
Windows
C:\Program Files\Eloquence\8.4\share\webdlg2\htdocs

The web server needs to be configured so that the files in this directory can be accessed.

Example configuration for Apache httpd version 2.2 or newer (HP-UX, Linux):

# Eloquence WEBDLG2 client
Alias "/webdlg2" "/opt/eloquence/8.4/share/webdlg2/htdocs"
<Directory "/opt/eloquence/8.4/share/webdlg2/htdocs">
  Options None
  # Apache 2.4
  <ifModule mod_authz_core.c>
    Require all granted
  </ifModule>
  # Apache 2.2
  <ifModule !mod_authz_core.c>
    Order allow,deny
    Allow from all
  </ifModule>
  # Caching
  <ifModule mod_headers.c>
    Header Set Cache-Control "private, max-age=60, must-revalidate"
  </ifModule>
</Directory>

Equivalent configuration for Windows (Lines 1..3 are different, please note that forward-slashes are used because Apache httpd might interpret a backslash as escape character):

# Eloquence WEBDLG2 client
Alias "/webdlg2" "C:/Program Files/Eloquence/8.4/share/webdlg2/htdocs"
<Directory "C:/Program Files/Eloquence/8.4/share/webdlg2/htdocs">
  Options None
  # Apache 2.4
  <ifModule mod_authz_core.c>
    Require all granted
  </ifModule>
  # Apache 2.2
  <ifModule !mod_authz_core.c>
    Order allow,deny
    Allow from all
  </ifModule>
  # Caching
  <ifModule mod_headers.c>
    Header Set Cache-Control "private, max-age=60, must-revalidate"
  </ifModule>
</Directory>

This configuration publishes the /webdlg2 URI for the Eloquence share/webdlg2/htdocs installation directory to serve the WEBDLG2 client JavaScript and CSS documents.

Lines 14..17 allow the browser to store the files in the user's private cache but asks for validation before reuse if a cached file is older than one minute. This should avoid delivering outdated files after a WEBDLG2 update has been installed.

Save this in a file named webdlg2.conf in the Apache httpd conf.d directory, typically in one of the locations listed below:

/etc/httpd/conf.d
/etc/apache/conf.d
/etc/apache2/conf.d

On Windows:
The directory is typically: C:\Apache24\conf\extra

To activate the webdlg2.conf file, a line like below needs to be added to the end of the httpd.conf file (typically located in the C:\Apache24\conf directory):

Include conf/extra/webdlg2.conf

Please note: The web server may need to be restarted when its configuration has been modified.


This is an example for a minimum WEBDLG2 document to be served by an external web server:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <script id="eq-webdlg"
            src="/webdlg2/eq-webdlg.js?port=8188">
    </script>
    <link href="/webdlg2/eq-webdlg.css"
          rel="stylesheet" type="text/css">
    <title>
      Eloquence WEBDLG2
    </title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0">
    <meta name="format-detection"
          content="telephone=no,date=no,address=no,email=no,url=no">
  </head>
  <body></body>
</html>


The differences between this document and the WEBDLG2 document served by the eloqwebd2 internal web server are in lines 6 and 8:

To connect an eloqwebd2 server located on a system different from the web server, the host= query string argument may be specified for the eq-webdlg.js script.

For example, specifying both the host= and port= query string arguments:

<script id="eq-webdlg"
        src="/webdlg2/eq-webdlg.js?host=OTHER.SERVER.NAME&port=8188">
</script>


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2024-10-28  
  Copyright © 1995-2024 Marxmeier Software AG