search cancel

How to enable Apache Web Server to listen on multiple ports in eHealth?


Article ID: 50921


Updated On:


CA eHealth



When Apache starts, it binds to some port and address on the local machine and waits for incoming requests. By default, it listens to all addresses on the machine. However, it may need to be told to listen on specific ports or only on selected addresses or a combination of both.

eHealth 6.2 uses Apache 2.2.11 web server for hosting the eHealth web user interface and by default it listens to Port 80 unless explicitly specified to listen on any other port


The Listen directive can be used to tell the server to accept incoming requests only on the specified ports or address-and-port combinations. If only a port number is specified in the Listen directive, the server listens to the given port on all interfaces. If an IP address is given as well as a port, the server will listen on the given port and interface. Multiple Listen directives may be used to specify a number of addresses and ports to listen on. The server will respond to requests from any of the listed addresses and ports.

Syntax: Listen [ port | IP-address:port ]
Default: none
Context: server config
Status: Core

The following steps must be performed as a user with administrator privileges if running a Windows OS and if it?s a Unix machine these steps must be done as the root user.

  1. Stop the httpd process(UNIX)

    /etc/init.d/ stop

  2. cd $NH_HOME/web/httpd or $NH_HOME/web/httpd/conf for eHealth 6.0 SP2 and higher

  3. Create a httpd.tpl file or add to an existing httpd.tpl file

    Please make sure the directives in the httpd.tpl file must be exactly as specified below and the httpd.tpl file must include an empty line as the last line in the file

    Create the httpd.tpl as per the below example which the additional port number that needs to be added for the server to accept connections

    #Custom Basic Section
    Listen 8001
    # End Custom Basic Section

  4. Recreate the httpd.conf file and signal the web server to reread the new httpd.conf. This can be done in one of the following two ways:

    1. Add or modify the permissions of a web user from the web admin UI. This will recreate the httpd.conf file and signal the web server to reread the new httpd.conf
    2. Manually rebuild the httpd.conf by following the steps shown in Technical Solution TEC519984

  5. As root, restart the httpd daemon as:

    /etc/init.d/ start

  6. Test your work by hitting your web site on the new Port number: http://yoursite:8001


Component: EHWEB