Tuesday, April 7, 2015

Liferay Site/Organization Virtual Hosting

Generally in Liferay administration we create sites and organizations and each site and organization have unique URL to access these sites/organizations. Generally we will have friendly URL to access these sites/organizations in Liferay.

Each site/organization has its own friendly URL and it consist pattern like /web and site/organization name. When we see /web in the URL then we can consider that is Site/Organization in Liferay.

Site Example

Site Name:
Site Friendly URL
Complete URL Pattern
Host Name+ Site Friendly URL
Complete URL
http://localhost:8080 /web/liferaysavvy

Organization Example

Site Name:
Site Friendly URL
Complete URL Pattern
Host Name+ Organization Friendly URL
Complete URL
http://localhost:8080 /web/liferaysavvyorg

Generally in real time we won’t use friendly URL to access site/organization we will use unique domain name and that will be pointing to Liferay site/organization.to achieve this we will use Liferay virtual host configuration.

Liferay Virtual Host is way of accessing site/organization with real world domain names. In Production we use apache web server, domain vendor control panel configurations and finally we use Liferay virtual host configuration.

In development environment to replicate same kind of configuration in our local system we will follow some sequence of steps.

Assume we wanted to access our Liferay site/organization with URL like www.liferaysavvy.com  in our local system.

  • Create Site/Organization
  • Configure Site URL with desired domain name www.sitename.com
  • In host file map with your domain name

Liferay Site Virtual Hosting

Create Site

Access Liferay portal and login as Liferay Administration.

Go Control Panel from Admin Docbar.

Control panel we can see site section there click on sites link

Now in the sites page we can see Add button click on Add and select Blank Site

Once we click on Blank site we can see site creation form and it will ask basic details related to site like name and description. Please fill all details and click on save button then site will be created.

After successful site creation then it will navigate to site settings page there we can see many option related to site settings

In site setting page Right site section we can see Site URL link click on site URL then we can have provision to specify our site URL and this is the place we need to provide our desired domain name/site host name.
We have two kinds of pages in Liferay Site Public pages and Private pages. Public pages is can be accessed by all the site users but private pages can be accessed by only the user who is created  it means site admin and site owner can access.

We can provide two distinct Virtual Hosts (URL/Domain Name) for each set of pages. For accessing public pages we can give one Virtual Host (URL/Domain Name) and for private pages we can give other Virtual Host (URL/Domain Name).

When we click on Site URL link then we can have provision to give public pages Virtual Host and Private pages Virtual Host.

We need to provide valid URL/Host Name in Virtual Host input fields then click on save button. Now Our Site can be accessed by given site URL.

 As we know that at time of site creation we have chosen black site so that it does not have any pages.
Liferay site should have at least one page to access with URL now we need to create one site page for our newly created site (LiferaySavvy)

Now in the site Options page Left Site Section you can find Pages menu tab there you can see site pages link. Click on that so that we can create pages for site.

Now select public pages and under this we can create new page by clicking one Add Page option .when we click on Add Page it will open popup there  it will ask required page details. Once we fill detail then click on adds page button in the popup then page will be crated under site public pages section.

New page (home) will be created in the public pages section

Mapping Virtual Host Name with local system IP

This is final step in Liferay Site Virtual Host and here we need to map given Site URL with our Local System IP address (

Generally our local system IP is and we need to map IP with Site URL in the system host file.

In every system OS we have host file there we will configure host names related to our local system. Based on Operating System we can find host file in different locations. Generally it will be under etc directory (etc/host)

For windows this file location as follows


Now open host file in editor and map your Site URL with in the new line in file and finally save the file then mapping will be completed.     www.liferaysavvy.com

Now open your desire browser, in the address bar ping your given Site URL then it will open your Liferay site.


In Development environment we are using only Application servers so we need to append Port number for Site URL when we access from browser.

If Site is already created then we need to access site setting page then follow the above steps to complete Liferay site virtual hosting.

Go to list of sites and select your desired site then click on Actions menu there we can find Site Administration.

Once we click on site administration then we can see configuration in Left side Menu when we click on that we can find site settings. In the Site Setting right side section you can see site URL there you need to enter your desired site URL name. Rest of the steps same as above.

Same way we can also configure virtual host for site private pages. You also follow same steps for Liferay Organizations to configure virtual host.


  1. I am glad to be a visitor of this consummate web site! , appreciate it for this rare info ! . free phone mockup

  2. As being a Newbie, We’re permanently exploring online for articles which can be of help to me. Many thanks webflow developer

  3. The Case For HIIT Cardio – Why You Should Concider it… By the way you might want to check out this cool site I found…… webflow development agency

  4. But i can not create message board from Virtual host ip address , is there any solution ?

  5. Hello! I’ve been following your blog for a while now and finally got the courage to go ahead and give you a shout out from Kingwood Texas! Just wanted to mention keep up the good work! web development companies

  6. I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back in the future. All the best web developer company

  7. A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one buy rdp

  8. It can be tough to write about this topic. I think you did an excellent job though! Thanks for this! ux design agency

  9. howdy, your websites are really good. I appreciate your work. bestarkserverhosting.com

  10. And I can tell you, I have made a number of mistakes, hence lost substantial amount of money. Mediatemple coupon codes

  11. The recent shift from traditional media to more direct media (social media) will result in PR firms specializing in or launching divisions devoted to blogs, social networking sites, mobile media and podcasts. tiktok

  12. This is a correct blog for anybody who really wants to be made aware of this topic. You understand so much its practically challenging to argue along (not too I actually would want…HaHa). You certainly put the latest spin with a topic thats been discussed for decades. Great stuff, just wonderful! web design agency los angeles

  13. Web hosting is the business practice of providing space and bandwidth on a high-powered computer server that is connected to the Internet at very high speeds. hosting24 coupon 2020

  14. Wow! This could be one particular of the most useful blogs We have ever arrive across on this subject. Basically Fantastic. I am also an expert in this topic so I can understand your hard work. web design company los angeles

  15. I conceive you have noted some very interesting details , regards for the post. converting websites

  16. I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. Limitless Referrals

  17. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. Webhosting

  18. When your website or blog goes live for the first time, it is exciting. That is until you realize no one but you and your. www.vrbonk.com

  19. Another great thing about a promo code is that it can work great for both old and new customers. The reason is that the incentives have a great impact on the shopping experience of buyers, according to the research reports released by the Center for Neuroeconomics Studies at Claremont Graduate University. Check out this URL

  20. It is important to know what the requirements of your website are. Only if you have an idea of what you need, Managed VPS Hosting you can look for them in the web hosting solutions.

  21. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. edge apps


Recent Posts

Recent Posts Widget

Popular Posts