HTTPManifold Configuration

At this point, the application should be installed and ready to run. If the client installation has not yet been completed, first see the installation guide.

Configuration

HTTPManifold can be configured either by editing the configuration file directly, or using the web configuration interface.

Edit httpmanifold.conf

The HTTPManifold is broken in to sections with options. There is no limit to the number of sections that can be defined. Options are parsed using CSV syntax being of the form option,value. Any line which does not match a section or option value is ignored. The configuration file contains a list of sections and options as well as example usage. It is provided here for reference.

# ===============================================================
# HTTP Servers
# ===============================================================
#
# Any number of HTTP servers can be added using the [HttpServer] 
# section definition.
# 
# Options:
#
# port:
#    the TCP/IP port that the HTTPManifold HTTP server should 
#    listen on (default 80)
# connections:
#    the number of simultaneous connections that are allowed 
#    (default 100)
#
# Example:
#
# [HttpServer]
# port,80
# connections,10
#
# ===============================================================
# HTTPS Servers
# ===============================================================
#
# Any number of HTTPS servers can be added using the [HttpsServer] 
# section definition.
#
# Options:
#
# port = 
#    the TCP/IP port that the HTTPManifold HTTPS server should 
#    listen on (default 443)
# connections = 
#    the number of simultaneous connections that are allowed 
#    (default 100)
# keyStore = 
#    the path to the JKS keystore that contains the SSL 
#    certificate and private key (required)
# keyPass = 
#    the keystore password required to access the certificate 
#    (required)  
#
# Example:
#
# [HttpServer]
# port,443
# connections,10
# keyStore,keystore.jks
# keyPass,mypass

[HttpServer]
port,8000
connections,10

[HttpServer]
port,8888
connections,10

[HttpServer]
port,80
connections,10

# ===============================================================
# HttpManifoldHost
# ===============================================================
#
# The [HttpManifoldHost] section defines the parameters for the 
# internal configuration and log interface from HTTPManifold.  
# If this section is omitted, the internal web interface will 
# not be available.
#
# Options:
#
# name:
#    the name by which this host section will be known
# host:
#    the hostname header that must matched for this host section 
#    to be called (there can be multiple host parameters)
# logName:
#    the prefix that will be used to log requests to this host 
#    definition (optional)
#
# Example:
#
# [HttpManifoldHost]
# name,HttpManifold
# host,localhost:8000
# host,127.0.0.1:8000
# logName,httpmanifold
#
# ===============================================================
# InternalHost
# ===============================================================
#
# Static content can be served through HTTPManifold using the 
# [InternalHost] section.  Declaring the source of static content 
# is a matter of providing the root directory of the content.  
#
# Options:
#
# name = 
#    the name by which this host section will be known
# host = 
#    the hostname header that must matched for this host section 
#    to be called (there can be multiple host parameters)
# logName = 
#    the prefix that will be used to log requests to this host 
#    definition (optional)
# publicHtml = 
#    the path to the static content (required)
#
# Example:
#
# [InternalHost]
# name,httpmanifold.org
# host,httpmanifold.org
# host,httpmanifold.org:80
# logName,httpmanifold
# publicHtml,res/httpmanifold.org
#
# ===============================================================
# Host
# ===============================================================
#
# HTTPManifold's core feature deals with forwarding HTTP requests 
# to alternate servers.  It can forward requests using HTTP or 
# HTTPS to any other web server.  While forwarding the request, 
# additional processing and logging can optionally be performed.  
# Raw HTTP requests can be saved, and the content of requests can 
# be modified substituting the external hostname with the 
# forwarded hostname and vice-versa.
#
# Options:
#
# name = 
#    the name by which this host section will be known
# host = 
#    the hostname header that must matched for this host section 
#    to be called (there can be multiple host parameters)
# logName = 
#    the prefix that will be used to log requests to this host 
#    definition (optional)
# destinationProtocol = 
#    the protocol used by the desitnation server, http or https 
#    (default http)
# destinationHost = 
#    the address of the destination host, IP address or domain 
#    name (required)
# destinationPort = 
#    the port used by the destination host (required)
# destinationPath =
#    the sub-path on the destination host that the request should
#    be forwarded to (default empty)
# destinationConnectionTimeout = 
#    the number of milliseconds to wait for the destination 
#    machine to connect (default 5000)
# destinationReadTimeout = 
#    the number of milliseconds to wait before encountering a 
#    read timeout from the destination machine (default 15000)
# allowKeepAlive = 
#    whether or not to allow keep-alives to this server 
#    (default false)
# convertHEADtoGET = 
#    change HEAD commands to GET when forwarding the request to 
#    the destination server (default true)
# rewriteRequestHeaders = 
#    substitute incoming hostname with destination hostname in 
#    headers during forwarding (default true)
# rewriteRequestBody = 
#    substitute incoming hostname with destination hostname in 
#    POST body during forwarding (default true)
# rewriteResponseHeaders = 
#    substitute destination hostname with incoming hostname in 
#    response headers during forwarding (default true)
# rewriteResponseBody = 
#    substitute destination hostname with incoming hostname in 
#    response body during forwarding (default true)
# rewriteByteLimit = 
#    the maximum number of content bytes that can be processed 
#    during forwarding (default 1048576)
# logRawRequest = 
#    log the raw request bytes before being processed 
#    (default false)
# logProcessedRequest = 
#    log the processed request bytes that are forwarded to the 
#    destination (default false)
# logRawResponse = 
#    log the raw response bytes before being processed 
#    (default false)
# logProcessedResponse = 
#    log the processed response bytes that are returned from the 
#    destination (default false)
# replaceRule =
#    simple string replacement rule that is applied when rewrite
#    headers and bodies is enabled.  Usually used in conjunction
#    with destinationPath.  Unlimited replaceRules can be created.
#    Syntax is "replaceRule,[original],[replace].  See the example
#    below for a sample (default no rules)
#
# Example:
#
# [Host]
# host,localhost
# host,localhost:80
# logName,sample
# destinationProtocol,http
# destinationHost,agiletrack.org
# destinationPort,80
# destinationPath,/demo
# destinationConnectionTimeout,5000
# destinationReadTimeout,15000
# allowKeepAlive,false
# convertHEADtoGET,true
# rewriteRequestHeaders,true
# rewriteRequestBody,true
# rewriteResponseHeaders,true
# rewriteResponseBody,true
# rewriteByteLimit,2000000
# logRawRequest,true
# logProcessedRequest,true
# logRawResponse,true
# logProcessedResponse,true
# replaceRule,href="/demo/,href="/
# replaceRule,src="/demo/,src="/

[HttpManifoldHost]
name,HttpManifold
host,localhost:8000
host,127.0.0.1:8000
logName,httpmanifold

[Host]
name,Sample Forward
host,localhost
host,localhost:80
host,localhost:8888
logName,logs/sample/sample
destinationProtocol,http
destinationHost,httpmanifold.org
destinationPort,80
destinationConnectionTimeout,5000
destinationReadTimeout,15000
allowKeepAlive,false
convertHEADtoGET,true
rewriteRequestHeaders,true
rewriteRequestBody,true
rewriteResponseHeaders,true
rewriteResponseBody,true
rewriteByteLimit,2000000
logRawRequest,true
logProcessedRequest,true
logRawResponse,true
logProcessedResponse,true
           
           

Web Configuration

The web configuration interface has not been implemented yet.

Launch

At this point the tool should be configured and ready for use. Simply launch the application and try connecting to one of the listening ports to see if things are functioning correct, and enjoy.

For further information about using HTTPManifold, continue to read the documentation.