Inicio > GlassFish, Java > Configuración del GlassFish con Apache Http Server

Configuración del GlassFish con Apache Http Server

Modo 1

1.       Instalar el Apache Http Server

2.       Activar los siguientes modulos en el httpd.conf

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_http_module modules/mod_proxy_http.so

3.       Agregar este virtualHost en el httpd.conf

<VirtualHost *:80>

ServerName 192.168.56.1

ProxyPass / http://192.168.56.1:8080/

ProxyPassReverse / http://192.168.56.1:8080/

</VirtualHost>

Modo 2

1.       Instalar el Apache Http Server

2.       Descargar el mod_jk-1.2.31-httpd-2.2.3.so en caso de tener Apache 2.2.x o el mod_jk-1.2.31-httpd-2.0.52.so en caso de tener el Apache 2.0.x

3.       Copiar el mod_jk en RUTA_APACHE/modules

4.       Crear el archivo workers.properties en RUTA_APACHE/conf

# Define 1 real worker using ajp13

worker.list=worker1

# Set properties for worker1 (ajp13)

worker.worker1.type=ajp13

worker.worker1.host=localhost

worker.worker1.port=8080

5.       En el archivo httpd.conf agregar lo siguiente:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile «C:/Archivos de programa/Apache Software Foundation/Apache2.2/conf/workers.properties»

# Where to put jk logs

JkLogFile logs/mod_jk.log

# Set the jk log level [debug/error/info]

JkLogLevel debug

# Select the log format

JkLogStampFormat «[%a %b %d %H:%M:%S %Y] «

# JkOptions indicate to send SSL KEY SIZE,

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkRequestLogFormat set the request format

JkRequestLogFormat «%w %V %T %U %q»

# Send all jsp requests to GlassFish

JkMount /*.jsp worker1

# Send all /TestWeb/ requests to GlassFish

JkMount /intranet/* worker1

JkMount /frontoffice/* worker1

6.       Copiamos los siguientes jar a RUTA_GLASSFISH/glassfish/domains/domain1/lib

  • tomcat-ajp-5.5.23.jar
  • commons-logging.jar
  • log4j-1.2.9.jar
  • commons-modeler-2.0.1.jar

7.       En el domain.xml buscar <jvm-options> y agregar

<jvm-options>-Dcom.sun.enterprise.web.connector.enableJK=8080</jvm-options>

8.       En el GlassFish nos vamos a la siguiente opción Configuration – Network Config – Network Listeners – http-istener-1.

9.       Y activamos el JK Listener

Categorías: GlassFish, Java Etiquetas: ,
  1. No hay comentarios aún.
  1. No trackbacks yet.

Deja un comentario