7.2. Configure a load-balancing proxy using the HTTP Connector


Read this section to configure a load balancing proxy that uses the JBoss HTTP Connector.

Task: Configure a Proxy Server Listener

Follow this task to configure the Apache HTTP Server service to act as a load-balancing proxy using the JBoss HTTP Connector.

Prerequisites

  • An installed Web Server distribution, such as JBoss Enterprise Web Server or HPWS installed (designated by HTTPD_HOME in this documentation).
  • JBoss HTTP Connector modules. Refer to Chapter 6, Install proxy server components for details.
  1. Create a listen directive for the proxy server

    Edit the configuration file HTTPD_HOME/httpd/conf/JBoss_HTTP.conf and add the following:
    Listen IP_ADDRESS:PORT_NUMBER
    Copy to Clipboard Toggle word wrap
    Where IP_ADDRESS is the IP address of a server network interface to communicate with the worker nodes, and PORT_NUMBER is the port on that interface to listen on.

    Note

    The port PORT_NUMBER must be open on the server firewall for incoming TCP connections.

    Example 7.1. Example Listen Directive

    Listen 10.33.144.3:6666
    Copy to Clipboard Toggle word wrap
  2. Create Virtual Host

    Add the following <VirtualHost> block to HTTPD_HOME/httpd/conf/JBoss_HTTP.conf:
    <VirtualHost IP_ADDRESS:PORT_NUMBER>
    
       <Location />
          Order deny,allow
          Deny from all
          Allow from PARTIAL_IP_ADDRESS
       </Location>
    
       KeepAliveTimeout 60
       MaxKeepAliveRequests 0
    
       ManagerBalancerName mycluster
       AdvertiseFrequency 5
    
    </VirtualHost>
    Copy to Clipboard Toggle word wrap
    IP_ADDRESS and PORT_NUMBER match the values from the Listen directive.
    PARTIAL_IP_ADDRESS is the first 1 to 3 bytes of an IP address, to restrict access to a specific subnet - 10.33.144, for example.
  3. Configure SELinux to allow proxy traffic

    Enter the following commands as a root-equivalent user to modify the SELinux configuration to allow the proxy traffic:
    #semanage port -a -t http_port_t -p tcp 8079 #add port to the Apache port list to enable the next command to work
    #setsebool -P httpd_can_network_relay 1 #for mod_proxy to work
    
    Copy to Clipboard Toggle word wrap
  4. Optional: Disable Server Advertisement

    The presence of the AdvertiseFrequency directive, which is set to five seconds here, causes the server to periodically send server advertisement messages via UDP multicast.
    These server advertisement messages contain the IP_ADDRESS and PORT_NUMBER specified in the VirtualHost definition. Worker nodes that are configured to respond to server advertisements use this information to register themselves with the proxy server.
    To disable server advertisement, add the following directive to the VirtualHost definition:
    ServerAdvertise Off
    Copy to Clipboard Toggle word wrap
    If server advertisements are disabled, or UDP multicast is not available on the network between the proxy server and the worker nodes, you must configure worker nodes with a static list of proxy servers. Refer to Section 9.1, “Static proxy configuration” for directions.
  5. Restart the JBoss Enterprise Web Server Apache service

    Refer to HTTPD-specific documentation for detailed instructions.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat