Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Links being created incorrectly
24941, modificado 19 Anos atrás.
New Member
Postagens: 8
Data de Entrada: 28/07/06
Postagens Recentes
I've installed Liferay on JBoss with an Apache front end. I'm able to see the main page just fine and log in. But once I log in all links are hardcoded to localhost:9000. I'm running JBoss on port 9000. I can't access anything after logging in because the links are incorrect.<br /><br />How can I get Liferay to either generate relative links or at least have the server/port information that outside users access it with?<br /><br />-Dave
11121, modificado 19 Anos atrás.
Liferay Master
Postagens: 518
Data de Entrada: 20/07/05
Postagens Recentes
You can change the portal url in the Admin portlet.
24941, modificado 19 Anos atrás.
New Member
Postagens: 8
Data de Entrada: 28/07/06
Postagens Recentes
<br />You can change the portal url in the Admin portlet.<br /><br /><br />Unfortunately that doesn't work. I set it both the Home URL and Portal URL to www.mydomain.com/liferay and that didn't change the way the links are built.<br /><br />-Dave
<br />hi david,<br /><br />in portal.properties<br /><br /> #<br /> # Set the hostname that will be used when the portlet generates URLs.<br /> # Leaving this blank will mean the host is derived from the servlet<br /> # container.<br /> #<br /> web.server.host=<br /><br /> #<br /> # Set the preferred protocol.<br /> #<br /> #web.server.protocol=https<br /><br />hope this help.<br /><br />joe
Hi,<br /><br />Could explain more on how to change the url using Admin Portlet. <br /><br />I have a similar post <br /><br /><a href="http://www.liferay.com/web/guest/community/forums/message_boards/message/81446" target="_blank">http://www.liferay.com/web/guest/community/forums/message_boards/message/81446</a><br /><br />Regards,<br />Nagendra
<br />Hi,<br /><br />Could explain more on how to change the url using Admin Portlet. <br /><br />I have a similar post <br /><br /><a href="http://www.liferay.com/web/guest/community/forums/message_boards/message/81446" target="_blank">http://www.liferay.com/web/guest/community/forums/message_boards/message/81446</a><br /><br />Regards,<br />Nagendra<br /><br /><br />click on enterprise tab of admin portlet. you will see PortalURL and HomeURL.<br /><br />joe
24941, modificado 19 Anos atrás.
New Member
Postagens: 8
Data de Entrada: 28/07/06
Postagens Recentes
<br />hi david,<br /><br />in portal.properties<br /><br /> #<br /> # Set the hostname that will be used when the portlet generates URLs.<br /> # Leaving this blank will mean the host is derived from the servlet<br /> # container.<br /> #<br /> web.server.host=<br /><br /> #<br /> # Set the preferred protocol.<br /> #<br /> #web.server.protocol=https<br /><br />hope this help.<br /><br />joe<br /><br /><br />Thanks, that got me much closer. Now the problem is the port. <br /><br />The jboss server is running on port 9000 and my apache server redirects /liferay to it. After updating portal-ext.propertis with web.server.host and web.server.protocol, when I go to <a href="http://www.mydomain.com/liferay" target="_blank">http://www.mydomain.com/liferay</a> I am redirected to <a href="https://www.mydomain.com:9000/liferay" target="_blank">https://www.mydomain.com:9000/liferay</a>. <br /><br />So now for the redirect at least all I need to do is get rid of the 9000 on the URL. Hopefully once I'm able to log in the links will also be created correctly.<br /><br />I tried setting web.server.port to 443 but it didn't change anything.<br /><br />-Dave<br />
<br />Thanks, that got me much closer. Now the problem is the port. <br /><br />The jboss server is running on port 9000 and my apache server redirects /liferay to it. After updating portal-ext.propertis with web.server.host and web.server.protocol, when I go to <a href="http://www.mydomain.com/liferay" target="_blank">http://www.mydomain.com/liferay</a> I am redirected to <a href="https://www.mydomain.com:9000/liferay" target="_blank">https://www.mydomain.com:9000/liferay</a>. <br /><br />So now for the redirect at least all I need to do is get rid of the 9000 on the URL. Hopefully once I'm able to log in the links will also be created correctly.<br /><br />I tried setting web.server.port to 443 but it didn't change anything.<br /><br />-Dave<br /><br /><br />hi david,<br /><br /> i use mod_jk with apache-tomcat so i am not very familiar with apache-jboss setup. are you using mod_proxy? you may need to use proxypassreverse to rewrite the url so that jboss will get a port 80 when we do a request.getServerPort().<br /><br />joe
24941, modificado 19 Anos atrás.
New Member
Postagens: 8
Data de Entrada: 28/07/06
Postagens Recentes
<br />hi david,<br /><br /> i use mod_jk with apache-tomcat so i am not very familiar with apache-jboss setup. are you using mod_proxy? you may need to use proxypassreverse to rewrite the url so that jboss will get a port 80 when we do a request.getServerPort().<br /><br />joe<br /><br /><br />Yes, I'm using mod_proxy with the reverse. <br /><br />But, I found another fix. Added web.server.http.port=80 and web.server.https.port=443 solved the problem. Now the redirects are working and the links are being created correctly. <br /><br />Thanks for the help everyone!
Community
Company
Feedback