Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Thomas Berg
[RESOLVED] Removing /web/guest in Liferay 6.1
August 1, 2012 3:17 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 121

Join Date: September 7, 2009

Recent Posts

We are moving from Liferay 6.0.5 and have been able to access pages in the guest community without writing /web/guest and without using .htaccess

Let's say we have a page in the guest community name example-page. Instead of writing http://www.example.com/web/guest/example-page I want the page to be accessible with http://www.example.com/example-page

With Liferay 6.1 (upgraded from 6.0.5), I have not been able to get this to work. I've looked at different posts but nothing seems to work. If possible, I do not want to resort to using .htaccess. Can anyone give me detailed, step-by-step information about how to acheive this?

/ Thomas

EDIT :
Well, this is embarrassing emoticon

Turns out that I had been overzealous in disabling filters in portal-ext.properties...
I had somehow managed to disable the VirtualHostFilter! No wonder my setup broke ... Your solutions works of course!

I apologize for this stupid mistake, thanks for all the help guys emoticon

Regards
/ Thomas
Hitoshi Ozawa
RE: Removing /web/guest in Liferay 6.1
July 24, 2012 4:23 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Have you looked at the following thread?

http://www.liferay.com/community/forums/-/message_boards/message/13165118
Thomas Berg
RE: Removing /web/guest in Liferay 6.1
July 24, 2012 6:04 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 121

Join Date: September 7, 2009

Recent Posts

Thanks for your reply Hitoshi!

Yes, I've looked at that thread but unfortunately, I cannot start over with a fresh install since we're upgrading.

The virtual host for our (only) portal instance is set to example.com. I cannot change this to a blank value. When trying to use the same for the guest community, an error message stating "Please specify a unique virtual host" is shown.
elias saliba
RE: Removing /web/guest in Liferay 6.1
July 24, 2012 7:00 AM
Answer

elias saliba

Rank: New Member

Posts: 24

Join Date: July 16, 2012

Recent Posts

hi thomas,

1- Login in as portal administrator.
2- Go to Control Panel > Site Setting. (left menu)
3- Click on “Site URL“.(right menu)
4- Key in your desired domain in the “Public Pages” field (you can leave the Private Pages blank).
5- Save your changes.
6- You should be able to access the portal via your new domain (thomas.com:8080) and “/web/guest” has been remove from the URL.


hope this will help you.
keep us updated.
Hitoshi Ozawa
RE: Removing /web/guest in Liferay 6.1
July 24, 2012 2:26 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Your steps seems to the same as those given by Mike in the thread I've mentioned (the last post). Thomas probably got the notion that it has to be a fresh install from the first statement.

This works with a fresh install of LR 6.1. Here's the steps :

Create an entry in your hosts file, for example "127.0.0.1 mysite.com"
In Control Panel -> Sites -> Edit Site Settings
Site URL : Just enter "mysite.com" in the field "Public Pages". Don't change anything else.


BTW, if links in web content portlet contains web/guest/, they have to be fixed.
Thomas Berg
RE: Removing /web/guest in Liferay 6.1
July 25, 2012 12:47 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 121

Join Date: September 7, 2009

Recent Posts

Hi Elias and Hitoshi
Thanks for trying to help!

I was able to change the virtual host from mydomain.com to localhost for my portal instance by setting

1 company.default.web.id=mydomain.com

(was not a valid domain before)

Before I changed the company.default.web.id I was not able to set localhost as the value of Virtual Host for the portal instance. The error message "Please enter a valid Virtual Host" was shown.

So now I can set mydomain.com as the value of Public Pages for the guest community (named mydomain.com).
But even though the address of example-page is now set as http://mydomain.com/example-page, I get the following error in the log when trying to get to it:

109:18:35,289 WARN  [404_jsp:109] /example-page


Entering http://mydomain.com/web/guest/example-page gives the error net::ERR_TOO_MANY_REDIRECTS in Chrome.

So, we're (possibly) making progress but not quite there yet :-)
Oliver Bayer
RE: Removing /web/guest in Liferay 6.1
July 25, 2012 1:15 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 870

Join Date: February 18, 2009

Recent Posts

Hi Thomas,

I've faced the error ERR_TOO_MANY_REDIRECTS a while ago. Deleting the cookies and the browser cache solves the issue (at least it did it in my case emoticon).

HTH Oli
Thomas Berg
RE: Removing /web/guest in Liferay 6.1
July 25, 2012 2:54 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 121

Join Date: September 7, 2009

Recent Posts

Thanks Oli, good tip!

I discovered that I had set
1virtual.hosts.default.site.name=
2instead of
3virtual.hosts.default.site.name=Guest

Changing this back fixed "ERR_TOO_MANY_REDIRECTS".

But it does not solve my problem i'm afraid emoticon

The address mydomain.com/home stil gives me WARN [404_jsp:109] /home instead of serving the page even though the url of the page looks like this:
Attachment

Attachments: page-url.png (8.5k)
Thomas Berg
RE: Removing /web/guest in Liferay 6.1
July 30, 2012 4:56 PM
Answer

Thomas Berg

Rank: Regular Member

Posts: 121

Join Date: September 7, 2009

Recent Posts

So now I've lost /web/guest and get directed to http://mydomain.com/home when entering http://mydomain.com but the page is not served.
Instead I get WARN [404_jsp:109] /home... All pages in the Guest site are accessible by entering http://mydomain.com/web/guest/<page-name> which is fine, I just need them to also be available when entering http://mydomain.com/<page-name> (without /web/guest being added to the url).

All Wiki's and Forum posts seem simple enough but I just cannot get it to work!

I've successfully set the virtual host for the only portal instance to localhost and set the virtual host for the Guest-site to mydomain.com

My /etc/hosts looks like this:

1127.0.0.1 localhost
2a.b.c.d mydomain.com


Which settings in portal-ext.properties are involved in this and what values are you guys using for them?

1company.default.web.id=mydomain.com
2company.default.home.url=/web/guest
3virtual.hosts.default.site.name=Guest


Please, does anyone have an idea about which settings i've missed or set wrong? emoticon
Arno Broekhof
RE: Removing /web/guest in Liferay 6.1
July 31, 2012 3:08 AM
Answer

Arno Broekhof

Rank: Junior Member

Posts: 42

Join Date: October 18, 2011

Recent Posts

The settings:
1
2company.default.web.id=mydomain.com
3company.default.home.url=/web/guest


are not necessary.

why would you alter the hosts file? are you running apache or some other server as reverse proxy? if you give me more details on you're configuration i can help you.
Arvind Gupta
RE: Removing /web/guest in Liferay 6.1
May 16, 2013 2:09 AM
Answer

Arvind Gupta

Rank: Junior Member

Posts: 29

Join Date: December 17, 2012

Recent Posts

Hi did you find the solution i am also facing the same issue it is keep on going the below error:

13:11:00,479 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,489 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,509 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,519 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,539 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,549 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,565 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,586 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
13:11:00,596 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus
06:11:49,755 WARN [ajp-bio-8009-exec-1][404_jsp:109] /aboutus

I am using using apache2.2 in front of liferay .
Thomas Berg
RE: Removing /web/guest in Liferay 6.1
May 16, 2013 3:51 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 121

Join Date: September 7, 2009

Recent Posts

Hello Arvind,
Please see my Edit (the first post).

I had made a mistake while removing unneeded filters and also removed the VirtualHostFilter emoticon
The solutions provided by the other guys in this thread does work!

Hope you'll get it working too!

Regards
Thomas
Arvind Gupta
RE: Removing /web/guest in Liferay 6.1
May 24, 2013 12:01 AM
Answer

Arvind Gupta

Rank: Junior Member

Posts: 29

Join Date: December 17, 2012

Recent Posts

Thanks Thomas I missed that point.
Ed Quigley
RE: [RESOLVED] Removing /web/guest in Liferay 6.1
August 16, 2013 7:28 AM
Answer

Ed Quigley

Rank: New Member

Posts: 1

Join Date: March 11, 2013

Recent Posts

So. I just want to confirm that for Liferay 6.1 this solution works. There is no /web/guest in the urls presented to visitors and links do not require /web/guest and references to Liferay assets such as images do not require /web/guest. I just want to be sure of the path, before I follow it.