Server Program

Installing

Please follow the installer to install the program. The license file needs to be copied to the same directory where the Server Program has been installed.

Starting the Program

The JAR file for Web Interface V6.0 Server Program is xds-server.jar. It is necessary that the Antenna House Formatter environment variables are set in the same environment. The Antenna House Formatter Command-line interface should also be set in the environment's PATH. For Windows, if Antenna House Formatter has been correctly installed these should already be set. Linux users should consult the run.sh script that is installed with Antenna House Formatter to see which variables need to be set. In addition, Linux users must also add the Antenna House Formatter bin/ directory to their executable search path.

  export AHF74_64_HOME="/usr/AHFormatterV74"
  ...
  export PATH=/usr/AHFormatterV74/bin:$PATH

To execute the Server Program of Web Interface V6.0 enter the following command:

  java -jar xds-server.jar [options]
  
CAUTION: By default, the server log will be written in the installation directory ([install directory]/logs/xds.log). The user starting the Server Program should have write permission for this directory. The location of the log file can be changed in a Log4j configuration file specified with the -D Java virtual machine option. See the Logging chapter for more information.

The XDS_SERVER_CONFIG environment variable can be set with the absolute location of a file that contains default command line options. See Option File for the description of the file format.

When starting, the following dialogue might be displayed with Windows environment.

SecurityBlock

Please select the network corresponding to your environment and select [Allow access] for this case.

Server Command Line Options

Parameter Default Functions
-mp Value 0 Maximum number of Antenna House Formatter processes that can run at once.
  • 0. Unlimited number of processes
-mc Value 0 Number of clients allowed before connections are rejected.
  • 0. Unlimited connections
-port Value 9999 Port number to listen to. In order to communicate with the port to listen by -port, it's necessary to release the relevant port by tcp.
-password Password Password clients need to provide.
-tmp-dir Directory \tmp Default location for temporary files.
-resolve-client-hostname Resolve client's hostname when logging connections.
-timeout Value 0 Read timeout when clients are sending files. Values are in milliseconds.
  • 0. Infinite timeout
-heart-beat-time Value 500 Time between server and client keep alive packets. Values are in milliseconds. The keep alive packets appear in the client console output if the -xds-debug Web Interface V6.0 client option is set to 2.
-formatter-exe FormatterExecutable Location of Antenna House Formatter command line executable. If this option isn't specified, the first AHFCmd.exe program found in the environment's search PATH is used.
-allow-status-command Value 0 Allows clients to request server status.
  • 0. Status requests are not allowed
  • 1. Status requests are treated as normal connections and will be rejected if there are already a maximum number of allowed connections
  • 2. Status requests are handled outside of the check for maximum connections and allows an unlimited number of simultaneous requests
-ssl Enable the use of SSL.
-disallow-different-client-os Only allow 'Linux to Linux' or 'Windows to Windows' connections.
-default-formatter-config ConfigFile Specifies a Antenna House Formatter configuration file that is loaded before the user specified ones. The user can override the options with the values of additional configurations by using the -i option. For more information, see Antenna House Formatter Configuration Files.
-override-formatter-config ConfigFile Specifies a Antenna House Formatter configuration file that is loaded after the user specified ones. If this is not specified, [Install directory]/override-config.xml is used if it exists. If it doesn't exist [Current working directory]/override-config.xml is specified. It is an error if no override configuration exists. For more information, see Antenna House Formatter Configuration Files.
-java-prop Property Value Set a Java system property. This is used, for example, to specify keystores or passwords to use with SSL.
-version Print version and license information.
-help Print command line options to the console.

Logging

The Server Program of Web Interface V6.0 can output logging information to files and the console. Because Apache's Log4j library is used the output destination and the output level of the log can easily be changed. See the Logging chapter for more information. If a custom log configuration file is not specified the default logging behavior is to print DEBUG level messages to both [Install directory]/logs/xds.log and the console.

Antenna House Formatter Configuration Files

The -default-formatter-config option can be used to set Antenna House Formatter defaults that can be overridden with the values of any additional configuration files sent by clients. The clients can specify additional configuration files by using the -i option.

The main purpose of the override configuration file, override-config.xml specified by the -override-formatter-config option is to restrict Antenna House Formatter options that might not be safe if the client is untrusted. The current defaults for the override configuration disable the XSLT processor and Ghostscript executable locations and document configuration settings.

    <formatter-config>
      <formatter-settings axf-formatter-config="false" />
      <xslt-settings command="" />
      <pdf-settings ghostscript="" />
    </formatter-config>
  

This prevents an untrusted client from sending a configuration file that can execute random binaries on the server.

If XSLT processing or Ghostscript conversion of EPS images is desired the override configuration file must be edited with those options enabled. The executable paths set in the override configuration can not be changed by the client specified configuration files.

    <formatter-config>
      <xslt-settings command="" />
      <pdf-settings ghostscript="C:\Program Files\gs\gs9.19\bin\gswin64c.exe" />
    </formatter-config>

Additional security settings that can be enabled are descendant-or-self-files and external-entity.

descendant-or-self-files is available in Antenna House Formatter V6.4 or later. When this is set to true, the location of the external files that can be read is restricted to be within the same directory as the FO or HTML, or within a subdirectory of it. It isn't restricted by http: or https:. This will also prevent absolute links being resolved on the server.

external-entity is available in Antenna House Formatter V6.5 or later. When this is set to false, external references are not allowed with <!ENTITY> in XML (FO, XHTML, SVG, MathML etc.). Note that the setting doesn't apply to external XSLT processors called from Antenna House Formatter.

    <formatter-config>
      <formatter-settings descendant-or-self-files="true" external-entity="false" />
    </formatter-config>
  

Technical Notes



Copyright © 2005-2024 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.