Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
nidheesh ks
Adding virtual host for multiple instance
9 de diciembre de 2011 0:51
Respuesta

nidheesh ks

Ranking: New Member

Mensajes: 23

Fecha de incorporación: 26 de julio de 2011

Mensajes recientes

Hi,

I have created 6 instances in liferay with different virtual host during development.
But for real deployment i have only 5 domain name and the one instance should be accessible as http://some-domain/some-name
Is it possible to map an instance to be accessible like this?
Ravi Kumar Gupta
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 2:05
Respuesta

Ravi Kumar Gupta

Ranking: Liferay Legend

Mensajes: 1303

Fecha de incorporación: 23 de junio de 2009

Mensajes recientes

I dont know how much this is possible.. but you can give it a try..
Create a dummy virtual host name in hosts file. Give it to last instance. Now map this instance using apache proxy to the url you want.. emoticon
nidheesh ks
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 2:53
Respuesta

nidheesh ks

Ranking: New Member

Mensajes: 23

Fecha de incorporación: 26 de julio de 2011

Mensajes recientes

Thanks for you reply.
Iam using glassfish server , dont know whether it is possible to use proxy like what we use in apache.
Ravi Kumar Gupta
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 2:58
Respuesta

Ravi Kumar Gupta

Ranking: Liferay Legend

Mensajes: 1303

Fecha de incorporación: 23 de junio de 2009

Mensajes recientes

I believe there should not be any issue with the app server here. Since any outside user will send a request to suppose url1 which is mapped to url2 by apache proxy. Apache will proxy all requests accordingly.. it will take request as url1 and will request url2 on the system.. whatever is the response, it will send as url1 to the user.

No where the app server is in picture.. Try this and see if it works fine..
nidheesh ks
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 3:12
Respuesta

nidheesh ks

Ranking: New Member

Mensajes: 23

Fecha de incorporación: 26 de julio de 2011

Mensajes recientes

In my case Glassfish is the Application server (Glassfish 3.0). We are not using apache as the application server.
Ravi Kumar Gupta
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 3:20
Respuesta

Ravi Kumar Gupta

Ranking: Liferay Legend

Mensajes: 1303

Fecha de incorporación: 23 de junio de 2009

Mensajes recientes

Apache is not an application server.. thats a simple web server which you need to put in front of your application server as a proxy to all sites.. emoticon
Ravi Kumar Gupta
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 3:21
Respuesta

Ravi Kumar Gupta

Ranking: Liferay Legend

Mensajes: 1303

Fecha de incorporación: 23 de junio de 2009

Mensajes recientes

Please note that this is just one possible solution.. if there is any other way, I am not aware of that emoticon
Milen Dyankov
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 3:28
Respuesta

Milen Dyankov

Ranking: Regular Member

Mensajes: 173

Fecha de incorporación: 23 de septiembre de 2009

Mensajes recientes

Ravi Kumar Gupta:
I believe there should not be any issue with the app server here. Since any outside user will send a request to suppose url1 which is mapped to url2 by apache proxy. Apache will proxy all requests accordingly.. it will take request as url1 and will request url2 on the system.. whatever is the response, it will send as url1 to the user.


In fact this will not always work as sometimes Liferay generates URLs based on virtual host's name. So if you do as described above, you may end up viewing page at http://host1/page in which some links will be /page2 but some will be http://host2/page3. Needles to say the second one will not work unless host2 is accessible to the client.

Of course you may configure some-domain as default domian and then acces the other one via http://some-domain/web/some-name/... but I guess this is not what you want.
Ravi Kumar Gupta
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 3:35
Respuesta

Ravi Kumar Gupta

Ranking: Liferay Legend

Mensajes: 1303

Fecha de incorporación: 23 de junio de 2009

Mensajes recientes

Fair point Milen.. emoticon

Can this not be solved using a different context than Root.. ???
nidheesh ks
RE: Adding virtual host for multiple instance
9 de diciembre de 2011 9:36
Respuesta

nidheesh ks

Ranking: New Member

Mensajes: 23

Fecha de incorporación: 26 de julio de 2011

Mensajes recientes

I will elaborate more clearly what is my issue :-
Suppose I have 3 instance in liferay other than the default one.
instance 1 - a.com
instance 2 - b.com
instance 3 - c.com

But now at the time of deployment, i have only two domain names a.com and b.com
And the other one should be accessible as "a.com/c"
All pages in third website should comes as a.com/c/*

Iam not getting any idea, if nothing is happening I will have to create all the pages inside a.com with "/c/*" as friendly url.

Another idea i thought is about creating another organization with name "c" in a.com, but doing this also /web/c/ will be coming .
Is there any other solution
Arno Broekhof
RE: Adding virtual host for multiple instance
10 de diciembre de 2011 12:04
Respuesta

Arno Broekhof

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de octubre de 2011

Mensajes recientes

You can try accomplishing this with you're reverse proxy by doing something like the following ( if you're using apache )

for the website where you wish to use /a create set a virtual example.com in the portal instance and make sure you're reverse proxy server can
resolve the example.com server.

NameVirtualHost 23.123.123.123:80
<VirtualHost 123.123.123.123:80>
ServerName www.a.com

ProxyPreserveHost Off
ProxyTimeOut 30
ProxyVia Off
<Location /a >
ProxyPass http://example.com:8080/
</Location>

</VirtualHost>
nidheesh ks
RE: Adding virtual host for multiple instance
11 de diciembre de 2011 21:11
Respuesta

nidheesh ks

Ranking: New Member

Mensajes: 23

Fecha de incorporación: 26 de julio de 2011

Mensajes recientes

Thank you for your reply , but we are not using apache. We don't have much time , so we have started creating pages inside first site itself.