Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contexto

Se cuenta con servidores web como Apache o IIS instalados y se desea configurar o3 para poder acceder desde fuera de la organización a través de una url conocida sin necesidad de utilizar el puerto, por ejemplo: http://demo.ideasoft.biz/o3web o  http http://demo.ideasoft.biz/eportal.

(info) Se asume que el servidor Apache tiene instalado, habilitado y configurado el mod_jk y el mod_proxy.

Procedimiento

Cuando se tiene un apache, o un IIS, por arriba de la instalación de O3, se deben modificar las siguientes propiedades (properties).

Sí, tomamos como ejemplo como nombre del servidor: "demo.ideasoft.biz", es necesario realizar la siguiente configuración:

Portlets.properties

o3.http.host=demo.ideasoft.biz
o3.http.port=80
liferay.port=80

exist.port=8088

O3Server.properties

http.host=demo.ideasoft.biz
http.port=80

...

exist.host=${rest.host}
exist.port=${rest.post}8088

gis.o3portal.url = http://demo.ideasoft.biz/o3portal
geoserver.url = http://demo.ideasoft.biz/geoserver
eportal.url = http://demo.ideasoft.biz/eportal

O3Web.properties

o3.http.upload.host=demo.ideasoft.biz
o3.http.upload.port=80

urlPrefixChannel=http://demo.ideasoft.biz/o3-parts-blaze-web
urlPrefixUploadFiles=http\://demo.ideasoft.biz
urlPrefixPortal=http\://demo.ideasoft.biz
urlPrefixExist=http\://demo.ideasoft.biz

<o3>/liferay/

...

portal-ext.properties

host.name=demo.ideasoft.biz
o3.cas.server.host=${host.name}
o3.base.url=http://${host.name}
liferay.host=${host.name}

<o3>/liferay/tomcat/webapps/eportal/WEB-INF/web.xml

Buscar el filtro "o3ClientSSOLiferayFilter" y "o3ClientSSOLogoutLiferayFilter" y agregar el "init-param" llamado "serverName" con el valor "demo.ideasoft.biz" (en lugar de "localhost:8080) 

Code Block
<filter>
        <filter-name>o3ClientSSOLiferayFilter</filter-name>
        <filter-class>biz.ideasoft.liferay.portal.filter.O3ClientSSOLiferayFilter</filter-class>
    
        <init-param>
            <param-name>serverName</param-name>
            <param-value>demo.ideasoft.biz</param-value>
        </init-param>
         
    </filter>
    <filter>
        <filter-name>o3ClientSSOLogoutLiferayFilter</filter-name>
        <filter-class>biz.ideasoft.liferay.portal.filter.O3ClientSSOLogoutLiferayFilter</filter-class>
        
        <init-param>
            <param-name>serverName</param-name>
            <param-value>demo.ideasoft.biz</param-value>
        </init-param>
         
    </filter>



...

Configuración de mod_jk en Apache

Agregar los workers en el archivo "conf/workers.properties", definirlo en worker.list y luego agregar el puerto (se obtiene de /jboss/standalone/configuration/o3bi.xml(<socket-binding name="ajp" port="8009"/>) se le suma o resta el offset) y el servidor.

Code Block
worker.list=worker12
worker1,worker2

worker.worker12worker1.port=puerto (por defecto es el 8009)
worker.worker12worker1.host=Nombre de servidor o ip
worker.worker12worker1.type=ajp13
worker.worker12worker1.lbfactor=1
 
worker.worker2.port=puerto (por defecto es el 8309)
worker.worker2.host=Nombre de servidor o ip
worker.worker2.type=ajp13
worker.worker2.lbfactor=1

(Luego de agregar los workers en el archivo "conf/workers.properties" agregar el host virtual en "conf.d/virtualhost.conf", se requiere tener instalado en apache el mod_proxy)

Code Block
<VirtualHost *:80>
    ServerName example.xxx.org
    ServerAdmin webmaster@xxx.org
   
     JKMount# /o3web
worker12  JkMount /o3web worker1
 JKMount JkMount /o3web/* worker12worker1
    JKMountJkMount /exist worker12worker1
    JKMountJkMount /exist/* worker12worker1
  JkMount  JKMount /o3report worker12worker1
   JkMount JKMount /o3report/* worker12worker1
    JKMountJkMount /cas worker12
    JKMount /cas/* worker12worker1
  JkMount  JKMount /o3-rest worker12worker1
  JkMount  JKMount /o3-rest/* worker12worker1
   JkMount JKMount /rbac-rest worker12worker1
  JkMount  JKMount /rbac-rest/* worker12worker1
    JKMountJkMount /o3-parts-blaze-web worker12worker1
   JkMount JKMount /o3-parts-blaze-web/* worker12
 worker1
  JKMount /o3bi-admin worker1
  JKMount /o3bpa worker13
 /o3bi-admin/* worker1
  JKMount /o3bi-adhoc worker1
  JKMount /o3bpao3bi-adhoc/* worker1
  worker13
 JKMount /modeshape-jcr-rest worker1
  JKMount /modeshape-jcr-rest/* worker1
    
    
    # eportal worker14
    JkMount /eportal worker2
    JKMountJkMount /eportal/* worker14worker2
    JKMountJkMount /eportalthemes worker14worker2
    JKMountJkMount /eportalthemes/* worker14worker2
    JKMountJkMount /o3-liferay-theme worker14worker2
    JKMountJkMount /o3-liferay-theme/* worker14worker2
    JKMountJkMount /geoserver worker14worker2
    JKMountJkMount /geoserver/* worker14worker2
    JKMountJkMount /o3-parts-web worker14worker2
    JKMountJkMount /o3-parts-web/* worker2
    JkMount /o3portal worker2
    JkMount /o3portal/* worker2
    JKMount /* worker14notifications-portlet worker2
    JKMount /notifications-portlet/* worker2
    JKMount /welcome-theme worker2
    JKMount /welcome-theme/* worker2
    JKMount /j2ep worker2
    JKMount /j2ep/* worker2
    JKMount /o3portalo3bpa-dashlets worker14worker2
    JKMount /o3portal/* worker14o3bpa-dashlets/* worker2
    
    #exist
    ProxyPass       	/exist   http://servidor:8088/exist
    ProxyPassReverse    /exist   http://servidor:8088/exist
     
   
</VirtualHost>


(warning) IMPORTANTE: En el caso de utilizar HTTPS debe agregar estos 3 mismos workers en el archivo SSL.conf.