Tech Info 077: Switching WebShare to port 80 on the WebShare WebObjects Server

HELIOS Tech Info #077

Fri, 20 Feb 2004

Switching WebShare to port 80 on the WebShare WebObjects Server

This technote provides more information about how to setup WebShare to use the default HTTP port and how to run WebShare parallel with the existing Web Server on the same machine, using port 80 for the HTTP communication.
Some customers will not allow any other port than the default HTTP port 80. Changing the WebShare port to 80 offers more compatibility to other users behind there own proxy servers and firewalls.

Switching WebShare to port 80 on the WebShare WebObjects Server

First set the “WOPort” preference and then stop and start the WebShare WebObjects Server:
# prefvalue -k Programs/websharewoa/WOPort -t int 80
# srvutil stop websharewoa
# srvutil start websharewoa

Changing the WebShare listening IP address

By default WebShare accepts incoming HTTP connections from all IP addresses / network interfaces on port 2009. When the “WOPort” gets changed to 80 this may conflict with the existing Apache Server on the same host. The workaround is to setup a second ip address (alias) on the same interface and configure WebShare to use the second ip address on port 80. The DNS/Hosts configuration must be updated with the second ip address e.g. “webshare.yourdomain.com” mapping to the second ip address. This can be done via: 
# ifconfig en2 alias 193.141.98.11
This is the alias command for IBM AIX 5.x using the network interface “en2” assigning the additional ip address. The “ifconfig” alias syntax is different on every UNIX platform, check your options in the ifconfig manual. The IP address has to be valid within your internet network range / class.
The second step is to tell WebShare to listen only on the new interface instead of all interfaces. This can be done via the WebShare WebObjects Server preference “WOHost”. The new WOHost name must resolve to the new alias IP address. 
# prefvalue -k Programs/websharewoa/WOHost -t str "webshare.yourdomain.com"
# srvutil stop websharewoa
# srvutil start websharewoa

Please note:

The WebShare 1.0 manual does not include the “WOHost” preference. The default is unset and WebShare will accept connections from all interfaces.