Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Chris Parsons
Running Liferay twice on same server
24 de Setembro de 2012 03:09
Resposta

Chris Parsons

Ranking: New Member

Mensagens: 6

Data de entrada: 25 de Março de 2009

Mensagens recentes

A variation of this question has already been asked, but it did not help me - I have an existing 5.2.3 installation I am looking to upgrade and as this appears to be a difficult exercise I thought at least I could set up a separate 6.1.1 installation to get the new design sorted out (with it's own database)

My issue is that I need to provide access to the new site AND the existing site on the same URL (my designers are physically remote from me)

I cannot use different ports for the two installations because of firewall issues for them for anything other than port 80, so I have installed Apache to 'front end' the two installations using mod_proxy_ajp successfully (after some struggling) - ie the domain name goes to Apache which then redirect to the appropriate AJP port (8009 for the existing site and 8019 for the new site)

My problem? I am trying to use 'http://<domain name>/new' to bring up the new site, which works after a fashion, but the navigation is getting confused/mixed up with the existing site - no control panel being loaded on the new site for instance?

The original idea was serving 'http://<domain name>/test.html' coming from the existing site and 'http://<domain name>/new/test.html' coming from the new installation

What is the best way to approach this?

My existing Apache config is shown below

snipped...
<VirtualHost *:80>
ProxyPreserveHost On
ServerName domain.org.uk
ServerAlias *.domain.org.uk

RewriteEngine on
#RewriteCond %{HTTP_HOST} !^domain\.org\.uk
#RewriteRule ^/?(.*)$ http://domain\.org\.uk$1 [L,R=301]

RewriteRule ^/new(.*) ajp://localhost:8019/$1
RewriteRule ^/(.*) ajp://localhost:8009/$1
</VirtualHost>

...snipped

I am sure this is a matter of getting the correct code in the above, or the portal-ext.properties file in each installation but it is defeating me at the moment!

Thanks

Chris Parsons
Sampsa Sohlman
RE: Running Liferay twice on same server
24 de Setembro de 2012 04:17
Resposta

Sampsa Sohlman

LIFERAY STAFF

Ranking: Regular Member

Mensagens: 218

Data de entrada: 27 de Setembro de 2007

Mensagens recentes

Hi Chris

Chris Parsons:
The original idea was serving 'http://<domain name>/test.html' coming from the existing site and 'http://<domain name>/new/test.html' coming from the new installation


Try following.

You could give url namespace to your other server (or both). So the other server would not need to be running on / path but example : /new.

You configure this by adding following to portal-ext.properties for your Liferay 6.1.1


 1## Portal Context
 2##
 3
 4    #
 5    # Specify the path of the portal servlet context. This is needed because
 6    # javax.servlet.ServletContext does not have access to the context path
 7    # until Java EE 5.
 8    #
 9    # Set this property if you deploy the portal to another path besides root.
10    #
11    portal.ctx=/new


and apache

1ProxyPass /new ajp://localhost:8019/new
2ProxyPassReverse /new ajp://localhost:8019/new