-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat JBoss Web Server
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
- Log in to an account with local administrator permissions.
- Go to Control Panel → System.
- Click on the Advanced tab.
- Click the Environment Variables button.
- Click the New for System Variables.
- For
JAVA_HOME
,TMP
andTEMP
, enter the appropriate name-value pairs for your system. - 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
- Open a Command Prompt with administrator privileges.
- Change to the
etc
folder of your JBoss Web Server installation:cd /D "JWS_HOME\etc"
- 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
- Open a Command Prompt with administrator privileges.
- Change to the
bin
folder for your Tomcat version:cd /D "JWS_HOME\share\tomcat<VERSION>\bin"
- 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 toManual
- 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.
- Open a Command Prompt with administrator privileges.
- Change to the
bin
folder of your JBoss Web Server installation:cd /D "JWS_HOME\bin"
- 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
- Open a Command Prompt with administrator privileges.
- Change to
JWS_HOME\share\extras\
- 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
- Replace
tomcat-juli.jar
file in your Tomcatbin
directory with thetomcat-juli.jar
file fromJWS_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.
- Open a file browser and go to
JWS_HOME\etc\httpd\conf.d
. - Rename the SSL configuration file:
- To remove SSL, rename
ssl.conf
tossl.conf.disabled
. - To re-add SSL rename
ssl.conf.disabled
tossl.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.
- In
JWS_HOME\etc\httpd\conf.d\
, create a file namedworkers.properties
.This file should contain the available workers (JBoss instances). - In
JWS_HOME\etc\httpd\conf.d\
, create a file namedmod_jk.conf
.This file contains general mod_jk configuration. - In
JWS_HOME\etc\httpd\conf.d\
, create a file nameduriworkermap.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.
- 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. - Configure the server to load the mod_cluster modules:
- Create the file
JWS_HOME\etc\httpd\conf.d\mod_cluster.conf
. - 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:
- Right-click the
JWS_HOME
folder and clickProperties
. - Select the
Security
tab. - Click the Edit button.
- Click the Add button.
- In the text box, enter
LOCAL SERVICE
. - Select the
Full Control
check box for theLOCAL SERVICE
account. - Click
OK
. - Click the Advanced button.
- Inside the Advanced Security Settings dialog, select
LOCAL SERVICE
and click Edit. - Select the check box next to the Replace all existing inheritable permissions on all descendants with inheritable permissions from this object option.
- Click OK through all the open folder property windows to apply the settings.