4.3. Configuring the JBoss Web Server Installation


Some configuration is required before running Red Hat JBoss Web Server. This section includes the following configuration procedures:

Procedure 4.4. Running the Post-Installation Scripts

  1. Open a shell prompt, and change directory to JWS_HOME/etc.
  2. Issue the following commands to run the post-installation scripts:
    sh .postinstall.httpd
    sh .postinstall.tomcat
    
    Copy to Clipboard Toggle word wrap
    The post-installation scripts create the Apache and Tomcat users and groups.

Procedure 4.5. Setting the JAVA_HOME Environment Variable

You must set the JAVA_HOME environment variable for Tomcat before running JBoss Web Server.
  1. Open the Tomcat configuration file:
    • For Tomcat 7: JWS_HOME/etc/sysconfig/tomcat7
    • For Tomcat 8: JWS_HOME/etc/sysconfig/tomcat8
  2. Remove the hash (#) sign at the beginning of the following line:
    # JAVA_HOME="/usr/java"
    Copy to Clipboard Toggle word wrap

Procedure 4.6. Removing/Re-Adding SSL Support

JBoss Web Server supports SSL by default, but it can be removed. Follow this procedure to remove or re-add SSL support.
  • Go to JWS_HOME/etc/httpd/conf.d and rename the SSL configuration file:
    • To remove SSL, rename ssl.conf to ssl.conf.disabled.
    • To re-add the SSL, rename ssl.conf.disabled to ssl.conf.

Procedure 4.7. Enabling log4j Logging for Tomcat

If required, follow this procedure to add log4j logging to Tomcat.
  1. Open a shell prompt and change directory to JWS_HOME/share/extras/.
  2. Copy the log4j-eap6.jar, log4j.properties, and tomcat-juli-adapters.jar files to the lib directory of the Tomcat directory.
    For example:
    extras]# cp log4j.properties ../tomcat<VERSION>/lib/
    Copy to Clipboard Toggle word wrap
    extras]# cp log4j-eap6.jar ../tomcat<VERSION>/lib/
    Copy to Clipboard Toggle word wrap
    extras]# cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/
    Copy to Clipboard Toggle word wrap
    Replace <VERSION> with the respective Tomcat version number (7 or 8).
  3. Replace tomcat-juli.jar file in your Tomcat bin directory with the tomcat-juli.jar file from JWS_HOME/share/extras/:
    extras]# cp tomcat-juli.jar ../tomcat<VERSION>/bin/
    Copy to Clipboard Toggle word wrap

Procedure 4.8. Configuring mod_jk

If required, you can configure Apache HTTP Server to use mod_jk as its load balancer.
The steps below list the locations of the mod_jk configuration files. For detailed mod_jk configuration instructions, see the Configure Load Balancing Using Apache HTTP Server and mod_jk section of the HTTP Connectors and Load Balancing Guide.

Note

Sample configuration files are provided for mod_jk, and are located in JWS_HOME/etc/httpd/conf.d/. The sample configuration files are: mod_jk.conf.sample, workers.properties.sample, and uriworkermap.properties.sample. To use these samples instead of creating your own configuration files, remove the .sample extension, and modify their content as needed.
  1. In JWS_HOME/etc/httpd/conf.d/, create a file named workers.properties.
    This file should contain the available workers (JBoss instances).
  2. In JWS_HOME/etc/httpd/conf.d/, create a file named mod_jk.conf.
    This file contains general mod_jk configuration.
  3. In JWS_HOME/etc/httpd/conf.d/, create a file named uriworkermap.properties.
    This file contains request mapping rules that map requests to workers.

Procedure 4.9. Configuring Apache HTTP Server to Use mod_cluster

  • mod_cluster can be configured in JWS_HOME/httpd/conf.d/mod_cluster.conf.
    For more information about customizing mod_cluster, see the mod_cluster Connector section of the HTTP Connectors and Load Balancing Guide.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat