Configuring Tomcat for Codebeamer
The following describes using codeBeamer with Tomcat. For configuration help with other application servers, such as Oracle Weblogic Server 11g (10.3.2) please make use of Intland Professional Services.
SSL Certificate
CodeBeamer is shipped with a self-signed SSL-Certificate from Intland. The Port's SSL certificate is configured in the <cb-installation-dir>/tomcat/conf/server.xml file in the section:
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector port="8443"
...
keystoreFile="webapps/cb/config/keystore"
keystorePass="..."
...
/>
To configure your own SSL-Certificate, change the attributes keystoreFile and keystorePass, to point to the keystore with your certificate.
Maximum HTTP POST Size
Tomcat by default sets a limit on the maximum size of HTTP POST requests to 2 Mb. If you get the error message Post too large edit the <Connector> element in <cb-installation-dir>/tomcat/conf/server.xml and add an attribute maxPostSize and set a larger value (in bytes) to increase the limit. Setting it to 0 will disable the size check.
Using codeBeamer standard HTTP/HTTPS without Root Priviledge
The solution is at http://wiki.apache.org/tomcat/HowTo
under "How to run Tomcat without root priviledges?":
Is there a way to allow normal user(non-root) to start/stop the tomcat server. Tried assigning permision, did not work. Read thru some articles, stated that only root has permission to port below 1025. How can i allow a non-root user to do so ? thks in adv.
Redirecting Port (iptabes)
One way is to use iptables to redirect Port 80 and 443 to user ports (>1024)
$ /sbin/iptables -A FORWARD -p tcp --destination-port 443 -j ACCEPT
$ /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp --destination-port 443 --to-ports 8443
$ /sbin/iptables -A FORWARD -p tcp --destination-port 80 -j ACCEPT
$ /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp --destination-port 80 --to-ports 8080
$ /sbin/iptables-save or /etc/init.d/iptables save
BSD-based Unix systems such as Mac OS X use a tool similar to iptables, called ipfw (for Internet Protocol Fire Wall). This tool is similar in that it watches all network packets go by, and can apply rules to affect those packets, such as "port-forwarding" from port 80 to some other port such as Tomcat's default 8080. The syntax of the rules is different than iptables, but the same idea. For more info, google and read the man page. Here is one possible rule to do the port-forwarding:
$ sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in
Using Apache in front of codeBeamer/Tomcat (mod_jk)
In order to run CodeBeamer/Tomcat with non-root privileges and be able to access CodeBeamer/Tomcat via the standard HTTP/HTTPS ports 80 and 443, you have to setup an Apache Web server with the Apache Tomcat Connector
(mod_jk) in front of CodeBeamer.
First you have to activate the Codebeamer/Tomcat AJP/1.3 port (typically 8009) by editing <cb-installation-dir>/tomcat/conf/server.xml, and removing the comments around the following section:
<Connector port="8009"
acceptCount="100"
maxPostSize="0"
maxThreads="100" minSpareThreads="4" maxSpareThreads="10"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
connectionTimeout="80000"
request.registerRequests="false"
disableUploadTimeout="true"
URIEncoding="UTF-8"
></Connector>
Next, you have to install and configure the
Installing Apache Webserver.