3.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 3.4. Setting Environment Variables

  1. Log in to an account with local administrator permissions.
  2. Go to Control PanelSystem.
  3. Click on the Advanced tab.
  4. Click the Environment Variables button.
  5. Click the New for System Variables.
  6. For JAVA_HOME, TMP and TEMP, enter the appropriate name-value pairs for your system.
  7. For the SSL Connector to work, you will also need to add JWS_HOME\bin to the PATH environment variable of the user that the services will run under. This is SYSTEM by default.

Procedure 3.5. Running the Post-Installation Scripts

  1. Open a Command Prompt with administrator privileges.
  2. Change to the etc folder of your JBoss Web Server installation:
    cd /D "JWS_HOME\etc"
  3. Run the Apache HTTP Server and Tomcat post-installation scripts with the following commands:
    call postinstall.httpd.bat
    call postinstall.tomcat.bat
    The scripts create the required symbolic links (Junction Points) for temporary logging and configuration directories.

Procedure 3.6. Installing the Tomcat Service

  1. Open a Command Prompt with administrator privileges.
  2. Change to the bin folder for your Tomcat version:
    cd /D "JWS_HOME\share\tomcat<VERSION>\bin"
  3. Install the Tomcat service with the following command:
    call service.bat install

Procedure 3.7. Installing the Apache HTTP Server Service

Note

By default, Apache HTTP Server is configured to use port 80. If you have Microsoft IIS installed, ensure that you disable or reconfigure it to avoid port conflicts:
  • Stop the World Wide Web... service, and change the Startup Type to Manual
  • Configure IIS to use different ports.
Alternatively, you can edit httpd.conf before installing the Apache HTTP Server service and change Listen to a port that does not conflict with the IIS ports.
  1. Open a Command Prompt with administrator privileges.
  2. Change to the bin folder of your JBoss Web Server installation:
    cd /D "JWS_HOME\bin"
  3. Install the Apache HTTP Server service with the following command:
    httpd -k install
    A Firewall security dialog prompt may appear asking for networking access for the Apache HTTP Server. Click Allow to access this service from the network.

Procedure 3.8. Enabling log4j Logging for Tomcat

  1. Open a Command Prompt with administrator privileges.
  2. Change to JWS_HOME\share\extras\
  3. Copy the log4j files to the lib folder for your Tomcat version:
    copy log4j-eap6.jar log4j.properties tomcat-juli-adapters.jar ..\tomcat<VERSION>\lib
  4. Replace tomcat-juli.jar file in your Tomcat bin directory with the tomcat-juli.jar file from JWS_HOME\share\extras\:
    copy tomcat-juli.jar ..\tomcat<VERSION>\bin

Procedure 3.9. 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.
  1. Open a file browser and go to JWS_HOME\etc\httpd\conf.d.
  2. Rename the SSL configuration file:
    • To remove SSL, rename ssl.conf to ssl.conf.disabled.
    • To re-add SSL rename ssl.conf.disabled to ssl.conf.

Procedure 3.10. 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 3.11. Configuring mod_cluster

The mod_cluster load balancer is optional. Follow this procedure to configure Apache HTTP Server to use mod_cluster as its load balancer.
For more information about customizing mod_cluster, see the mod_cluster Connector section of the HTTP Connectors and Load Balancing Guide.
  1. In JWS_HOME\etc\httpd\conf.modules.d\00-proxy.conf, ensure that there is a # at the beginning of the following line to disable mod_proxy_balancer.so:
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    This module is incompatible with mod_cluster.
  2. Configure the server to load the mod_cluster modules:
    1. Create the file JWS_HOME\etc\httpd\conf.d\mod_cluster.conf.
    2. Add the following lines to mod_cluster.conf:
      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
      LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so
      LoadModule manager_module modules/mod_manager.so
      LoadModule advertise_module modules/mod_advertise.so

Procedure 3.12. Configuring Folder Permissions for JBoss Web Server Services

Follow this procedure to ensure that the account used to run the services has full control over the JWS_HOME folder and all of its subfolders:
  1. Right-click the JWS_HOME folder and click Properties.
  2. Select the Security tab.
  3. Click the Edit button.
  4. Click the Add button.
  5. In the text box, enter LOCAL SERVICE.
  6. Select the Full Control check box for the LOCAL SERVICE account.
  7. Click OK.
  8. Click the Advanced button.
  9. Inside the Advanced Security Settings dialog, select LOCAL SERVICE and click Edit.
  10. Select the check box next to the Replace all existing inheritable permissions on all descendants with inheritable permissions from this object option.
  11. Click OK through all the open folder property windows to apply the settings.