Foros de discusión

RE: 100 PaperCuts - Sprint 5

thumbnail
Mika Koivisto, modificado hace 12 años.

RE: 100 PaperCuts - Sprint 5

Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
If the server is running in non standard http/https port then you might need to set following properties:
    #
    # Set the HTTP and HTTPs ports when running the portal in a J2EE server that
    # is sitting behind another web server like Apache. Set the values to -1 if
    # the portal is not running behind another web server like Apache.
    #
    web.server.http.port=-1
    web.server.https.port=-1
thumbnail
Corné Aussems, modificado hace 12 años.

RE: 100 PaperCuts - Sprint 5

Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
Hi Mika,

Thanks for your update but you confused me somehow.

AFAIK this issue is about Liferay not running behind another web server like Apache.
The issue is right on that when you set the liferay-portlet:renderURL secure attribute to true. only the protocol will be set to https

By implementing code based on your suggestion (assumption) the property is working the wrong way and should be set to a different port number;
from PortalImpl line 2373

		if (secure) {
			if (PropsValues.WEB_SERVER_HTTPS_PORT == -1) {
				if ((serverPort != Http.HTTP_PORT) &&
					(serverPort != Http.HTTPS_PORT)) {

					sb.append(StringPool.COLON);
					sb.append(serverPort);
				}
			}
			else {
				if (PropsValues.WEB_SERVER_HTTPS_PORT != Http.HTTPS_PORT) {
					sb.append(StringPool.COLON);
					sb.append(PropsValues.WEB_SERVER_HTTPS_PORT);
				}
			}
		}


Could you clarify somewhat?
Thanks
thumbnail
Mika Koivisto, modificado hace 12 años.

RE: 100 PaperCuts - Sprint 5

Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
Sorry I just copied the property but forgot to change the value. So web.server.https.port should be set to the port which you are using for https. With tomcat it would be set to 8443.
thumbnail
Corné Aussems, modificado hace 12 años.

RE: 100 PaperCuts - Sprint 5

Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
Mika Koivisto:
Sorry I just copied the property but forgot to change the value. So web.server.https.port should be set to the port which you are using for https. With tomcat it would be set to 8443.


I understand this but i do not comprehend the text heading these properties then;

# Set the HTTP and HTTPs ports when running the portal in a J2EE server that is sitting behind another web server like Apache.
# Set the values to -1 if the portal is not running behind another web server like Apache.


This last sentence applies in this case, so if i would implement this codebit from PortalImpl in HTTPImpl.protocolize i still wouldn't have these ports from configuration because someone leaves them on -1 on purpose, because the server is NOT running behind a Apache


BTW Maybe you could split this thread, or continue on the ticket itself, because we are a little bit off topic
thumbnail
Mika Koivisto, modificado hace 12 años.

RE: 100 PaperCuts - Sprint 5

Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
Most of the time you don't need to adjust those even if running behind apache. It's only when the proxy does not properly tell the app server where the original request came from. So if you are using mod_jk or mod_proxy_ajp you're good with the defaults. The logic seems to assume that you are running either http or https if the port is set to -1 and you're not using a standard http or https port. I think the text should be updated to also state that the port needs to be set if not using standard http or https ports which is usually the case only in local dev setup.
thumbnail
Corné Aussems, modificado hace 12 años.

RE: 100 PaperCuts - Sprint 5

Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
Mika,

I totally forgot to commit my patch.

Could you take a look at it because i decided that i remove any port if there and append one if necessary;
http://issues.liferay.com/browse/LPS-16863

Thanks