{"id":2136,"date":"2018-02-26T03:50:52","date_gmt":"2018-02-26T03:50:52","guid":{"rendered":"http:\/\/www.enprowess.com\/blogs\/?p=2136"},"modified":"2022-02-09T13:38:04","modified_gmt":"2022-02-09T13:38:04","slug":"multiple-portal-instances-liferay","status":"publish","type":"post","link":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/","title":{"rendered":"Multiple Portal Instances in Liferay"},"content":{"rendered":"<p>The benefit of virtual multiple portals consists of sharing several resources between the virtual portals. Rather than having one of these resources for each portal, all virtual portals use the same single instance of such a resource. This reduces the administrative cost and optimizes the resource usage. Typically, virtual portals share the following resources:<\/p>\n<ul>\n<li>Physical Server box.<\/li>\n<li>The JVM<\/li>\n<li>Portlets and other code fragments<\/li>\n<\/ul>\n<p>With Liferay, it is quite easy to get this done.\u00a0<strong>8 steps to create virtual portal instance in Liferay:<\/strong><\/p>\n<p>1. Configure domain name into network host file<\/p>\n<ul>\n<li>\u00a0Open hosts file as an administrator to edit<\/li>\n<li>\u00a0C: \u2192 Windows \u2192 System32 \u2192 Drives \u2192 etc \u2192 hosts file.<\/li>\n<li>append 127.0.0.1 www.enprowess.com\u00a0\u00a0 and save.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2138\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal1.png\" alt=\"\" width=\"494\" height=\"324\" \/><br \/>\nFigure 1: configuring domain name with system IP<\/li>\n<\/ul>\n<p>2. Start the server and login as administrator<\/p>\n<p>3. Navigate to Control Panel -&gt; Configuration -&gt; Virtual Instance<\/p>\n<p>4. click the\u00a0Add\u00a0 and configure domain name which is available on network host file<\/p>\n<p>&#8211; first you would see the Liferay default instance as Liferay.com.<br \/>\n&#8211; when you try to add instance by clicking \u00a0button, you would be on configuration page where you would fill-up form and click save such as:<\/p>\n<p>Web ID* : EnProwess<br \/>\nVirtual Host* : www.enprowess.com<br \/>\nMail Domain* : enprowess.com<br \/>\nMax User : as per your needs<br \/>\nActive : YES<\/p>\n<p>&#8211; After save you would see two instance such as:<br \/>\n<img decoding=\"async\" class=\"aligncenter size-medium wp-image-2139\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal2.png\" alt=\"\" height=\"225\" \/><br \/>\nFigure 2: virtual instance list<\/p>\n<p>5. See the virtual instance entry into Liferay local database<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2162\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal2.1.png\" alt=\"\" width=\"570\" height=\"54\" \/><br \/>\nFigure 3: instance entry into virtualhost table<\/p>\n<p>6. Access the URL: www.enprowess.com:8080 in browser<\/p>\n<p>7. Login as test@enprowess.com with test password<\/p>\n<p>8. Separate the property file for each portal instance<br \/>\n&#8211; you would refer \/\/link of property file of each portal instance in Liferay 7<br \/>\n<img decoding=\"async\" class=\"aligncenter size-medium wp-image-2140\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal3.png\" width=\"100%\" height=\"300\" \/><br \/>\nFigure 3: Fresh Liferay home screen<\/p>\n<p>Now lets see separation between virtual portals of the portal resources.\u00a0This means making portal resources available uniquely and separately to individual virtual portals and their users. Liferay allows us to create multiple properties file for each Liferay portal instance.<\/p>\n<p>Lets see <strong>4\u00a0steps to separate the properties file for each instance:<\/strong><br \/>\n1.\u00a0Create portal instance(virtual copy) properties file<br \/>\n&#8211; every virtual copy has webId while creation.<br \/>\n&#8211; you would create portal-&lt;webId&gt;-properties<br \/>\n&#8211; example : portal-EnProwess-properties<\/p>\n<p>2.\u00a0Place these file into server class path<br \/>\n&#8211; \\tomcat-8.0.32\\webapps\\ROOT\\WEB-INF\\classes\\Your file<br \/>\n<img decoding=\"async\" class=\"aligncenter size-medium wp-image-2141\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal4.png\" alt=\"\" width=\"100%\" height=\"325\" \/><br \/>\nFigure 1: portal instance property<\/p>\n<p>3.\u00a0Set system property company-id-properties with value true<br \/>\n&#8211; you would place -Dcompany-id-properties=true in setenv.bat file<br \/>\n&#8211; path : \\liferay-ce-portal-7.0-ga4\\tomcat-8.0.32\\bin\\setenv.bat<br \/>\n&#8211; set &#8220;CATALINA_OPTS=%CATALINA_OPTS%<br \/>\n-Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=UTC<br \/>\n-Dcompany-id-properties=true<br \/>\n-Xmx1024m -XX:MaxPermSize=384m -XX:+UseG1GC&#8221;<\/p>\n<p>4.\u00a0Restart the server and check log<br \/>\n<img decoding=\"async\" class=\"aligncenter size-medium wp-image-2142\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal5.png\" alt=\"\" width=\"100%\" height=\"325\" \/><br \/>\n&#8211; check entry at starting point of server start for system property<br \/>\nFigure 2: system property to load portal instance<br \/>\n&#8211; check entry at ending point of server start for portal instance property<br \/>\n<img decoding=\"async\" class=\"aligncenter size-medium wp-image-2143\" src=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/MultiPortal6.png\" alt=\"\" width=\"100%\" height=\"225\" \/><br \/>\nFigure 3: instance property file to be loaded<\/p>\n<p>Note : To check difference you would place different property into both file. Ex: enable\/disable terms.of.use.required=true\/false.<\/p>\n<p>Post By,<br \/>\nManish Luste<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The benefit of virtual multiple portals consists of sharing several resources between the virtual portals. Rather than having one of these resources for each portal, all virtual portals use the same single instance of such a resource. This reduces the administrative cost and optimizes the resource usage. Typically, virtual portals share the following resources: Physical&hellip; <a class=\"more-link\" href=\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/\">Continue reading <span class=\"screen-reader-text\">Multiple Portal Instances in Liferay<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2329,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18],"tags":[30,31,91,92],"class_list":["post-2136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-liferay","category-liferay-dxp","tag-liferay-7","tag-liferay-dxp","tag-multiple-portal-instances","tag-multiple-portals","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Multiple Portal Instances in Liferay - EnProwess<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Multiple Portal instances in Liferay\" \/>\n<meta property=\"og:description\" content=\"The benefit of virtual multiple portals consists of sharing several resources between the virtual portals. Rather than having one of these resources for each portal, all virtual portals use the same single instance of such a resource. This reduces the administrative cost and optimizes the resource usage.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/\" \/>\n<meta property=\"og:site_name\" content=\"EnProwess\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-26T03:50:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-09T13:38:04+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/liferay-multiple-portals.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Multiple Portal instances in Liferay\" \/>\n<meta name=\"twitter:description\" content=\"The benefit of virtual multiple portals consists of sharing several resources between the virtual portals. Rather than having one of these resources for each portal, all virtual portals use the same single instance of such a resource. This reduces the administrative cost and optimizes the resource usage.\" \/>\n<meta name=\"twitter:image\" content=\"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/liferay-multiple-portals.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dev_admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#website\",\"url\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/\",\"name\":\"EnProwess\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#webpage\",\"url\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/\",\"name\":\"Multiple Portal Instances in Liferay - EnProwess\",\"isPartOf\":{\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#primaryimage\"},\"datePublished\":\"2018-02-26T03:50:52+00:00\",\"dateModified\":\"2022-02-09T13:38:04+00:00\",\"author\":{\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#\/schema\/person\/0bf4f9fb6538f60f497377ecceb54f55\"},\"breadcrumb\":{\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multiple Portal Instances in Liferay\"}]},{\"@type\":\"Person\",\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#\/schema\/person\/0bf4f9fb6538f60f497377ecceb54f55\",\"name\":\"dev_admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-content\/uploads\/2021\/05\/p3.png\",\"contentUrl\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-content\/uploads\/2021\/05\/p3.png\",\"caption\":\"dev_admin\"},\"sameAs\":[\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\"],\"url\":\"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/author\/dev_admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Multiple Portal Instances in Liferay - EnProwess","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/","og_locale":"en_US","og_type":"article","og_title":"Multiple Portal instances in Liferay","og_description":"The benefit of virtual multiple portals consists of sharing several resources between the virtual portals. Rather than having one of these resources for each portal, all virtual portals use the same single instance of such a resource. This reduces the administrative cost and optimizes the resource usage.","og_url":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/","og_site_name":"EnProwess","article_published_time":"2018-02-26T03:50:52+00:00","article_modified_time":"2022-02-09T13:38:04+00:00","og_image":[{"url":"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/liferay-multiple-portals.png"}],"twitter_card":"summary_large_image","twitter_title":"Multiple Portal instances in Liferay","twitter_description":"The benefit of virtual multiple portals consists of sharing several resources between the virtual portals. Rather than having one of these resources for each portal, all virtual portals use the same single instance of such a resource. This reduces the administrative cost and optimizes the resource usage.","twitter_image":"http:\/\/www.enprowess.com\/blogs\/wp-content\/uploads\/2018\/02\/liferay-multiple-portals.png","twitter_misc":{"Written by":"dev_admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#website","url":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/","name":"EnProwess","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#primaryimage","inLanguage":"en-US","url":"","contentUrl":""},{"@type":"WebPage","@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#webpage","url":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/","name":"Multiple Portal Instances in Liferay - EnProwess","isPartOf":{"@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#primaryimage"},"datePublished":"2018-02-26T03:50:52+00:00","dateModified":"2022-02-09T13:38:04+00:00","author":{"@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#\/schema\/person\/0bf4f9fb6538f60f497377ecceb54f55"},"breadcrumb":{"@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/multiple-portal-instances-liferay\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/"},{"@type":"ListItem","position":2,"name":"Multiple Portal Instances in Liferay"}]},{"@type":"Person","@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#\/schema\/person\/0bf4f9fb6538f60f497377ecceb54f55","name":"dev_admin","image":{"@type":"ImageObject","@id":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/#personlogo","inLanguage":"en-US","url":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-content\/uploads\/2021\/05\/p3.png","contentUrl":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-content\/uploads\/2021\/05\/p3.png","caption":"dev_admin"},"sameAs":["http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com"],"url":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/author\/dev_admin\/"}]}},"_links":{"self":[{"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/posts\/2136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/comments?post=2136"}],"version-history":[{"count":6,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/posts\/2136\/revisions"}],"predecessor-version":[{"id":2424,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/posts\/2136\/revisions\/2424"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/media\/2329"}],"wp:attachment":[{"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/media?parent=2136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/categories?post=2136"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ws-srv-php72.in.webmyne.com\/enprowess.com\/wp-json\/wp\/v2\/tags?post=2136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}