How to change the port that the eHealth Web server uses (Legacy KB ID CNC TS488 )

Document ID : KB000051794
Last Modified Date : 14/02/2018
Show Technical Document Details
1. Log in as root.

2. Edit the $NH_HOME/nethealthrc.sh.usr file to set NH_HTTP_PORT to
the port you want to use for your Web server. For example,
enter this command in the $NH_HOME/nethealthrc.sh.usr file to set
NH_HTTP_PORT to use port 8001:
export NH_HTTP_PORT;NH_HTTP_PORT="8001"

NOTE
You must set this variable in the $NH_HOME/nethealthrc.sh.usr file.
You cannot set it directly in the $NH_HOME/web/httpd/httpd.conf file.

3. Edit the $NH_HOME/nethealthrc.csh file to set NH_HTTP_PORT to
the port you want to use for your Web server. For example,
enter this command in the $NH_HOME/nethealthrc.csh.usr file to set
NH_HTTP_PORT to use port 8001:
setenv NH_HTTP_PORT "8001"

4. From the $NH_HOME directory, from the C shell, as root,
source nethealthrc.csh
echo $NH_HTTP_PORT
to confirm that the variable $NH_HTTPD_PORT is set to 8001

5. Regenerate the Web server configuration file to reflect the
new port number, using the following command where
group is the group ID of the eHealth user:
$NH_HOME/web/webCfg/nhiHttpdCfg -user $NH_USER -grp group -nhDir $NH_HOME -cfg $NH_HOME/web/webCfg/users.cfg > $NH_HOME/web/httpd/httpd.conf
Note:
(In the installation guide, nhDir is incorrctly referenced as nhiDir)

6. Check the $NH_HOME/web/httpd/httpd.conf file to confirm that the Port is now set to 8001

7. Enter the following command to start the Web server where
ehHome is the eHealth installation directory:
/ehHome/web/httpd/bin/nhihttpd -f /ehHome/web/httpd/httpd.conf &
NOTE
If you start the Web server from the command line, you
must use this command to start it when it stops or after
the system reboots.


Configuring the Apache Web Server to Start Automatically

If you do not set the eHealth installation process to start the
Web server automatically, you can configure the Web server to
do so by editing the Web server initialization files.
To edit the initialization files:
1. Log in as root.
2. Using any text editor, do one of the following:
? On a Solaris system, edit the httpd.sh file in the
/etc/init.d directory.
? On an HP-UX system, edit the httpd.sh file in the
/sbin/init.d directory.
3. On a Solaris system or an HP-UX system, delete the pound
(#) character at the beginning of each line except the first
two in the httpd.sh file; the first two lines should look like
this:
#!/bin/sh
# Start/stop the Apache HTTPD web server
4. Specify the port by editing the NH_HTTP_PORT
environment variable in the $NH_HOME/nethealthrc.sh.usr and $NH_HOME/nethealthrc.csh files.
5. Save the file.

To start/stop the eHealth Web Server on HPUX, as root, from the /sbin/init.d directory, run the command
./httpd.sh start
to start the web server

./httpd.sh stop
to stop the web server.

To start/stop the eHealth Web Server on Solaris, as root, from the /etc/init.d directory, run the command
./httpd.sh start
to start the web server

./httpd.sh stop
to stop the web server..

Related Issues/Questions:
How to change the port that the Apache web server uses
How to change the port that the eHealth Web server uses
How to configure the web server to use a port other than 80

Problem Environment:
eHealth
Apache


(Legacy KB ID CNC TS488 )