CLONE - Virtual Host field in Portal Settings Causes 404 on first session action

Description

First portal actions fails before a session is established.

To reproduce,
Add the primany hostname used to access the default portal into the Virtual Host field. e.g.,

From the Control Panel
Portal Settings
Virtual Host: your.domain.com

Logout
Quit your browser completely (assure a new session will be established)

Open your browser and proceed to access the portal using the URL which was added to the Virtual Host field.

Once the initial page is loaded, try clicking on any other page.
Notice that the action was ignored and a log messaged appear in your tomcat log, e.g.:

19:00:13,041 WARN [404_jsp:?] /secondpage;jsessionid=127582B0DD888F77105E8C3A7C82791F

Click a second time on the page and it works.

Page clicking is only a small nuisance. But every first action fails-- including a login attempt.

Activity

Show:

Aniceto P Madrid May 10, 2012 at 1:07 AM

Added comments to

Aniceto P Madrid May 10, 2012 at 12:58 AM

Close this issue. The fix was fine. What fails is the ext-redeployment

Aniceto P Madrid May 9, 2012 at 2:04 PM

I've tested also to assign your.domain.com to the non loopback server ip, but the result was the same.

The ";jsession=..." is cached by the browser. So, if a session has been closed and later another one is open in the same browser, it remembers previous jsession attributes and probably that causes also the second link click after the 1st load also fails.

Aniceto P Madrid May 9, 2012 at 11:33 AM

I am getting this error in 6.1.0 CE when navigating as 1st page to one which has Vaadin portlets, even with the sample Vaadin portlet. I had previously an ext plugin to override this class
ext-service/classes/com/liferay/portal/kernel/templateparser/BaseTransformer

I looked in the commits for the previous fix and added it to my ext
ext-impl/classes/com/liferay/portal/servlet/filters/virtualhost/VirtualHostFilter

But it didn't fixed anything. I rebooted, and nothing else. I checked the ROOT/WEB-INF/ext-MyExtplugin-ext.xml and I saw it contained only a reference to BaseTransformer, not to the VirtualHostFilter. May be this is a bug. So I copied it from the ext plugin to WEB-INF and rebooted, just in case. But everything was the same.

This issue only happened when I opened a page from the internet: I have an Apache Httpd as proxy with this configuration
<VirtualHost *:80>
ServerName your.domain.com
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

If I browsed locally, that error never happens. Then I thought if the issue was related to the virtual host, my machine, which is behind a firewall, should be named as the liferay virtual domain. So I did:

  • appended your.domain.com to hosts file, ip 127.0.0.1

  • changed the proxy configuration from localhost to your.domain.com

Now this 404 error in the log happens even when browsing from local to http://your.domain.com:8080, but if I go to http://localhost:8080 it never happens

Or ext plugin has not applied the new VirtualHostFilter or the issue was not completely fixed in

Won't Fix

Details

Assignee

Reporter

Labels

Branch Version/s

6.1.x

Backported to Branch

Committed

Git Pull Request

Components

Affects versions

Priority

Zendesk Support

Created May 9, 2012 at 11:04 AM
Updated June 24, 2023 at 3:52 PM
Resolved May 10, 2012 at 8:05 PM
Loading...