掲示板

Running Liferay twice on same server

11年前 に Chris Parsons によって更新されました。

Running Liferay twice on same server

New Member 投稿: 6 参加年月日: 09/03/25 最新の投稿
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 [NC]
#RewriteRule ^/?(.*)$ http://domain\.org\.uk$1 [L,R=301]

RewriteRule ^/new(.*) ajp://localhost:8019/$1 [P]
RewriteRule ^/(.*) ajp://localhost:8009/$1 [P]
</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
thumbnail
11年前 に Sampsa Sohlman によって更新されました。

RE: Running Liferay twice on same server

Regular Member 投稿: 230 参加年月日: 07/09/27 最新の投稿
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


## Portal Context
##

    #
    # Specify the path of the portal servlet context. This is needed because
    # javax.servlet.ServletContext does not have access to the context path
    # until Java EE 5.
    #
    # Set this property if you deploy the portal to another path besides root.
    #
    portal.ctx=/new


and apache

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