Generate a certificate

If you will be using a secure protocol such as TLS to communicate from the Apache load balancer node to the Codar node, you need to generate the Apache load balancer node's certificate (in this document, it will be referred to as apache_csa.crt).

  1. Generate the certificate and private key. For a test environment, you can create a self-signed certificate and key using the following command:

    For Microsoft Windows:

    "<codar_home>\Apache2.2\openssl" req -x509 -days 365 -sha 256 -newkey rsa:2048 -nodes -keyout <codar_home>\Apache2.2\conf\apache_csa.key -out <codar_home>\Apache2.2\conf\apache_csa.crt -config <codar_home>\Apache2.2\conf\openssl.cnf -subj /O=HP/OU=HP/CN=<apache_load_balancer_host_name>

    For Linux:

    openssl req -new -x509 -days 365 -sha256 -newkey rsa:2048 -nodes -keyout /etc/httpd/conf/apache_csa.key -out /etc/httpd/conf/apache_csa.crt -config /etc/httpd/conf/openssl.cnf -subj /O=HP/OU=HP/CN=<apache_load_balancer_host_name>

    For detailed instructions on how to create certificates, refer to the Apache documentation ((http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#aboutcerts).

  2. Copy the certificate file (apache_csa.crt) to the <codar_home>\jbossas\ standalone\configuration directory (for Microsoft Windows) or the <codar_home>/jbossas/ standalone/configuration directory (for Linux) on the Codar nodes.