RE: 100 PaperCuts - Sprint 5RE: 100 PaperCuts - Sprint 5https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=88147902024-03-28T17:51:34Z2024-03-28T17:51:34ZRE: 100 PaperCuts - Sprint 5Corné Aussemshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=90941232011-06-02T20:56:11Z2011-06-02T20:56:11ZMika,<br /><br />I totally forgot to commit my patch.<br /><br />Could you take a look at it because i decided that i remove any port if there and append one if necessary;<br /><a href="http://issues.liferay.com/browse/LPS-16863">http://issues.liferay.com/browse/LPS-16863</a><br /><br />ThanksCorné Aussems2011-06-02T20:56:11ZRE: 100 PaperCuts - Sprint 5Mika Koivistohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=87734192011-05-10T21:02:56Z2011-05-10T21:02:56ZMost 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.Mika Koivisto2011-05-10T21:02:56ZRE: 100 PaperCuts - Sprint 5Corné Aussemshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=87620172011-05-10T07:02:44Z2011-05-10T07:02:44Z<div class="quote-title">Mika Koivisto:</div><blockquote>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.</blockquote><br /><br />I understand this but i do not comprehend the text heading these properties then;<br /><br /><blockquote># Set the HTTP and HTTPs ports when running the portal in a J2EE server that is sitting behind another web server like Apache. <br /> # <span style="color: #ff0a0a">Set the values to -1 if the portal is <strong>not</strong> running behind another web server like Apache.</span><br /> </blockquote><br /><br />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<br /><br /><br />BTW Maybe you could split this thread, or continue on the ticket itself, because we are a little bit off topicCorné Aussems2011-05-10T07:02:44ZRE: 100 PaperCuts - Sprint 5Mika Koivistohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=86136822011-05-09T21:32:49Z2011-05-09T21:32:49ZSorry 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.Mika Koivisto2011-05-09T21:32:49ZRE: 100 PaperCuts - Sprint 5Corné Aussemshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=86132922011-05-09T21:06:15Z2011-05-09T21:06:15Z<html><head></head><body>Hi Mika,<br><br>Thanks for your update but you confused me somehow.<br><br>AFAIK this issue is about Liferay not running behind another web server like Apache.<br>The issue is right on that when you set the liferay-portlet:renderURL <strong>secure</strong> attribute to true. only the protocol will be set to https<br><br>By implementing code based on your suggestion (assumption) the property is working the wrong way and should be set to a different port number;<br>from PortalImpl line 2373<br><pre><code>
if (secure) {
if (PropsValues.WEB_SERVER_HTTPS_PORT == -1) {
if ((serverPort != Http.HTTP_PORT) &amp;&amp;
(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);
}
}
}
</code></pre><br><br>Could you clarify somewhat?<br>Thanks</body></html>Corné Aussems2011-05-09T21:06:15ZRE: 100 PaperCuts - Sprint 5Mika Koivistohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=86120042011-05-09T19:26:35Z2011-05-09T19:26:35Z<html><head></head><body>If the server is running in non standard http/https port then you might need to set following properties:<br><pre><code> #
# Set