Fórum

Liferay 6.2 GA6 subdomain page link

thumbnail
Trini Dev, modificado 7 Anos atrás.

Liferay 6.2 GA6 subdomain page link

Junior Member Postagens: 35 Data de Entrada: 23/04/14 Postagens Recentes
HI All,

I have setup a two liferay instances one with a domain names www.domain .com
instance 2 with a sub-domain test.domain.com.

Note instance 1 is using https instance 2 is not.

I am trying to link a page from instance 2 example test.domain.com/help-me to instance 1 using the create page then add the url.

When I try to access this page from instance one, the url gets converted to https://test.domain.com/help-me to instance, which is not available.
http://test.domain.com/help-me is what the link should represent.
Question - why the instance 1 is forcing https?
Question - Is there a way to get this page link add the https instance without the https trigger?
thumbnail
Andrew Jardine, modificado 7 Anos atrás.

RE: Liferay 6.2 GA6 subdomain page link

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hi Trini,

There is a property that you can set in the portal-ext.properties file that will force the protocol to be HTTP. Add this to your portal-ext.properties file

web.server.protocol=http


This setting is not a INSTANCE based setting but rather a server wide setting. So it means that all urls that are generated by Liferay will use http as a protocol regardless of what protocol the inbound request contained. So it means both your INSTANCE 1 and your INSTANCE 2 will use http for their links (unless you have hardcoded a link somewhere in your code).

Some people configure their proxies to force a certain protocol for a domain. So if a request comes in using, say HTTP, the request is redirected to the same URL but using HTTPS. You could try to use a technique like this to get HTTPS on INSTANCE 1, but not on INSTANCE 2. I think the most important part though is that you have the default protocol to HTTP coming from Liferay because you cannot redirect from HTTPS -> HTTP for obvious (security) reasons.

I'm not a security guy though and my immediate concern with this solution, assuming it even works, is that the initial INSTANCE 1 request would be HTTP. For pages that might send sensitive information (say a login form) you'd want to make sure that you hardcode the URL to https. Otherwise I think someone could sniff your initial request before the proxy did the 302 to use HTTPS.

The other option is to use the opposite property -- force all the resulting protocols on both instances to https. Use your proxy to do SSL termination so that the traffic between the proxy and your Liferay server is http, but the links that LR generates are all secure. In terms of "cost" really its just an SSL cert and that's a pretty insignificant expense. Personally I would go with this option. I use this one with several client and I am sure it is the model used by most.

Hope that helps.
thumbnail
Olaf Kock, modificado 7 Anos atrás.

RE: Liferay 6.2 GA6 subdomain page link

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
The easiest solution that I can think of: Just use https. Mixing http and https means that you'll sooner or later have an issue where you're leaking information or where people accidentally transmit their password in clear text instead of http. Just cut out a whole class of possible mistakes and go https only.

I know that this is not what you want to hear, but in times of "Let's Encrypt" certificates that don't have extended privacy requirements don't even cost money any more.
thumbnail
Juan Gonzalez, modificado 7 Anos atrás.

RE: Liferay 6.2 GA6 subdomain page link

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Olaf Kock:
The easiest solution that I can think of: Just use https. Mixing http and https means that you'll sooner or later have an issue where you're leaking information or where people accidentally transmit their password in clear text instead of http. Just cut out a whole class of possible mistakes and go https only.

I know that this is not what you want to hear, but in times of "Let's Encrypt" certificates that don't have extended privacy requirements don't even cost money any more.


Absolutely. Even Google will improve your web site position just by having all in https: http://arstechnica.com/security/2014/08/in-major-shift-google-boosts-search-rankings-of-https-protected-sites/
thumbnail
Trini Dev, modificado 7 Anos atrás.

RE: Liferay 6.2 GA6 subdomain page link

Junior Member Postagens: 35 Data de Entrada: 23/04/14 Postagens Recentes
Note taken. But the issue is we have one server with https with certificates installed. I am trying to point a "link to page" to a http server as mentioned, but the url gets converted to https://test.domain.com/help-me.