Fórum

[RESOLVED] Removing /web/guest in Liferay 6.1

thumbnail
Thomas Berg, modificado 11 Anos atrás.

[RESOLVED] Removing /web/guest in Liferay 6.1

Regular Member Postagens: 131 Data de Entrada: 07/09/09 Postagens Recentes
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 [RESOLVED]:
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
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Have you looked at the following thread?

http://www.liferay.com/community/forums/-/message_boards/message/13165118
thumbnail
Thomas Berg, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Regular Member Postagens: 131 Data de Entrada: 07/09/09 Postagens Recentes
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.
thumbnail
elias saliba, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

New Member Postagens: 24 Data de Entrada: 16/07/12 Postagens Recentes
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.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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.
thumbnail
Thomas Berg, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Regular Member Postagens: 131 Data de Entrada: 07/09/09 Postagens Recentes
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

 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:

09: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, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Liferay Master Postagens: 894 Data de Entrada: 18/02/09 Postagens Recentes
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
thumbnail
Thomas Berg, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Regular Member Postagens: 131 Data de Entrada: 07/09/09 Postagens Recentes
Thanks Oli, good tip!

I discovered that I had set
virtual.hosts.default.site.name= 
instead of 
virtual.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:
thumbnail
Thomas Berg, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Regular Member Postagens: 131 Data de Entrada: 07/09/09 Postagens Recentes
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:

127.0.0.1 localhost 
a.b.c.d mydomain.com


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

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


Please, does anyone have an idea about which settings i've missed or set wrong? emoticon
thumbnail
Arno Broekhof, modificado 11 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Junior Member Postagens: 42 Data de Entrada: 18/10/11 Postagens Recentes
The settings:

company.default.web.id=mydomain.com
company.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, modificado 10 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Junior Member Postagens: 29 Data de Entrada: 18/12/12 Postagens Recentes
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 .
thumbnail
Thomas Berg, modificado 10 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Regular Member Postagens: 131 Data de Entrada: 07/09/09 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Removing /web/guest in Liferay 6.1

Junior Member Postagens: 29 Data de Entrada: 18/12/12 Postagens Recentes
Thanks Thomas I missed that point.
Ed Quigley, modificado 10 Anos atrás.

RE: [RESOLVED] Removing /web/guest in Liferay 6.1

New Member Mensagem: 1 Data de Entrada: 11/03/13 Postagens Recentes
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.