Liferay DXP 2026.Q4    |    Release Webinar: 18 November 2026    |    Replay coming soon! 

Blogs

How do I change Liferay Portal web context path from ROOT to portal

Tim Telcik
Tim Telcik
أقل من قراءة دقيقة

Overview

The article outlines the steps to change the default Liferay Portal web context from "/" to "/portal" ?

Steps

Step 1 - Over-ride property "portal.ctx"

Over-ride the property "portal.ctx" in file "LIFERAY_HOME/portal-ext.properties".

Add (or over-ride) the following property :

    portal.ctx=/portal

Step 2 - Deploy (or redeploy) the Liferay portal web app to the new context path.

Step 2.1 - Example using Liferay Portal 6.1 + Tomcat bundle

If you are using a Liferay Portal 6.1 + Tomcat bundle, you can change the Liferay Portal web app context path to "/portal" as follows :

  • Move/rename folder "TOMCAT/webapps/ROOT" to "TOMCAT/webapps/portal".
  • Move/rename context file "TOMCAT/conf/Catalina/localhost/ROOT.xml" to "TOMCAT/conf/Catalina/localhost/portal.xml"


Liferay Portal will now rewrite all paths relative to "/portal". Hence "/web/guest' will become "/portal/web/guest".
 
NOTE: If you are using a different Java web application server, or a non-LP+Tomcat bundle, the configuration process may vary.
 

References

تعليقات الصفحة

Related Assets...

لا توجد نتائج

More Blog Entries...

Himanshu Chauhan
نوفمبر ٢٠, ٢٠٢٦
Tony Lim
نوفمبر ١٩, ٢٠٢٦