CONFIGURING APACHE

Top  Previous  Next

The UnForm 10.1 server launches a private instance of the Apache web server to provide access to all browser-based functions and the REST interface.  Note this differs from previous versions, which included an internal HTTP server and optionally offered cgi scripts to run on an external web server.

 

On Windows, UnForm includes a bundled version of Apache, so there is no need to configure it.  On Linux and Unix systems, Apache must be installed on the system where UnForm is installed.  It is generally included with any Linux or Unix system.  All that is necessary for UnForm to operate its instance is to know where the Apache httpd executable is, and the Apache "home" directory where its modules are located.

 

The Unix ufsetup.sh setup script looks for Apache in several common locations, and will ask if Apache can't be found.  It will then create two variables in the /usr/bin/uf101d script called HTTPD and HTTPDHOME.  These are the default locations used when starting the Apache server.  Additional configuration is performed in the [apache] section of the uf101d.ini file.

 

httpd=path

Path to the Apache httpd executable (i.e. /usr/sbin/httpd).
 

Automatically configured under Windows, and defaults to the HTTPD variable defined in /usr/bin/uf101d.

serverhome=directory path

Home directory of Apache, where modules subdirectory is located (i.e. /etc/httpd).

 

Automatically configured under Windows, and defaults to the HTTPDHOME variable defined in /usr/bin/uf101d.

port=port number

The HTTP port the Apache server listens for UnForm requests.  Defaults to 27402.

apacheuser=user

apachegroup=group

Normally the UnForm server runs under the 'unform' user on Unix systems, but it can be configured to run under any user, including root.  If it runs as root, then the Apache server must start under a different user and group.

 

Enable these lines and set them to the proper values for your system if the UnForm server runs as root. Note the ufsetup.sh script will attempt to enable these lines if it configures UnForm to run as root and finds one of several standard Apache users.

 

Under Windows, the Apache server always runs under the same user as the UnForm server service.

adminemail=address

Configures an admin email address for the Apache server to use.

ssl=0|1

If set to 1, Apache will listen on an SSL port, requiring that browsers connect using the https:// protocol rather than http.

sslcert=path.pem

If configured to listen using SSL, by default UnForm will supply a self-signed certificate for Apache to use.  Browsers will warn users about the certificate not being trusted, which the user can ignore to continue, or he/she may install locally to avoid the warning message again.

 

If desired, a signed certificate can be supplied that matches the domain used to connect to the server.  Certificates for Apache are available from many vendors, such as LetsEncrypt, Verisign, Thawte, or GlobalSign.  See the mod_ssl documentation, specifically the SSLCertificateFile directive, on http://httpd.apache.org for details.

 

A combined certificate, containing a private key followed by the certificate, and possibly a certificate chain if required by the certificate authority, may be used.  More commonly, a vendor will supply separate files for the certificate, chain, and key.  You can enter those additional files in the sslchain and sslkey settings.

sslchain=path

If needed, a chain file can be supplied.  This is used for the SSLCertificateChainFile in the Apache configuration, if supplied.

sslkey=path

If needed (not in the sslcert file), a private key file can be supplied.  This is used for the SSLCertificateKeyFile in the Apache configuration, if supplied.

 

 

Apache Configuration  File

When UnForm launches the apache server instance, it does so with an apache.conf configuration file that is derived from the apache.tpl file in the UnForm server install location.  That file is a template with tags that are replaced at runtime to generate apache.conf.  The apache.tpl file is included in the UnForm installers and is overwritten by an update, so can't be customized.  If there is a need for customization of this file, you can copy it to apache.custom.tpl and modify that file.  Be sure to do this under controlled conditions and ensure that with an UnForm restart, Apache is started successfully by UnForm.  Apache configuration commands are very precise and an error will prevent Apache from starting.

 

Alternate Main Portal Page

The web/index.html file is the standard main portal page, displayed when a browser views the top level url, such as http://hostname:27402.  An alternate page can be displayed by creating the web/index.custom.html page.  Two examples are provided, index.list.html and index.tree.html, which provide different styles of indexes.  To make either of these active, copy the desired file to index.custom.html.