Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
MICHAIL MOUDATSOS
Display (javascript?) erros on IE when accessing through reverse proxy
February 28, 2012 5:36 AM
Answer

MICHAIL MOUDATSOS

Rank: Regular Member

Posts: 110

Join Date: October 4, 2011

Recent Posts

Hello all

I have installed Liferay 6.0.6 and in front of it, a reverse proxy using Apache. They both reside on the same machine. From that machine, when I access my web application using https://machine-ip/home I can't see my company logo (I see the the company name instead) and the CSS of my sign in portlet and the language portlet is broken (e.g. sign-in portlet has no background color). Their CSS is defined in my deployed theme. On the contrary, when I access the application server directly, that is using https://machine-ip:8443/home the company_logo resource is shown as it should and CSS works. Moreover, when I log in as admin, the dockbar drop down lists (e.g. Manage menu's drop down lists) won't work if I access through reverse proxy but will work If I access the app. server directly. This behavior concerns IE

Apart from those, I have (javascript?) errors on IE that prevent my page iterator's page links to work (on a datatable) on another page, an error which appears on both URLs (through proxy or directly on app server). I'm afraid this might be a problem related to ICEfaces that I use to build the portlet of that page.

Note that the existence of SSL setup probably has nothing to do with it because I had the same problems when I first set everything up over http.

What approach should I take in order to solve these problems?

-Should I look if there's something missing from my reverse proxy configuration? I don't know if it is relevant at all, but I also tried with ajp:// instead of https:// in my httpd.conf file, at ProxyPass and ProxyPassReverse directives, to no avail.

-Is this purely a javascript - IE problem? But then why some things work when accessing the app. server directly and do not work when accessing through proxy?

-Is there a solution for the links not working on page iterators (and on other icefaces components)?

Thank you all in advance

EDIT: (Since I 've searched a lot, I don't remember where exactly, but in some older post I 've read about a known issue of Alloy faces and IE but I don't know if it has to do with what I face, at all. I just thought to add this as a complementary info)

EDIT2: Broken functionality of dockbar drop down lists is also apparent when using Firefox browser as well, so it must be a javascript & proxy related problem - HELP?
Hitoshi Ozawa
RE: Display (javascript?) erros on IE when accessing through reverse proxy
February 28, 2012 5:56 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Have you tried turning of fast.loads?

http://ecomware.com/notes/liferay-themes-question-and-answer
MICHAIL MOUDATSOS
RE: Display (javascript?) erros on IE when accessing through reverse proxy
February 28, 2012 7:48 AM
Answer

MICHAIL MOUDATSOS

Rank: Regular Member

Posts: 110

Join Date: October 4, 2011

Recent Posts

Actually I've seen a post where you propose this for a similar issue, so I had already tried javascript.fast.load=false. Following your link I also tried theme.css.fast.load=false and theme.images.fast.load=false but nothing changed.

It is a bit strange and I don't really know what error is related to what technology and/or setup, but for example as far as the background color of the sign in portlet is concerned, defining this info for the id of the portlet, i.e #portlet_58 had no effect in IE up to version 8 (It worked for IE 9 but client has up to 8 at the moment and and the client's clients will definitely have IE as well, and who knows in which version). Changing the background color definition from this id to a class element, i.e. .portlet-boundary_58_ worked in all browsers.

However, the logic of this "patch"-solution can't be applied everywhere. For example, I don't know why the company logo is not shown (I think the resource /image/company_logo is not shown at all at IE's Developer tools, but I'm not sure since they suck and I don't know if I'm using them properly, in contrast with, eg, firefox or Opera corresponding tools).

It must be a combination of what I let pass through the reverse proxy and some IE issues. The way I'm letting something pass or not through the reverse proxy is by using rewrite conditions and rewrite rule, by denying everything that does not belong to a set of URL matching patters. Maybe I have ommitted something that is useful, but that's surely not entirely "it" because in other browsers company_logo and CSS of login portlet and language portlet is rendered correctly.

Any ideas?
Hitoshi Ozawa
RE: Display (javascript?) erros on IE when accessing through reverse proxy
February 29, 2012 7:27 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

I'm sorry but I have several installations using Apache + mod_jk upfront and I've never encountered any problem.
It's kind of difficult to help you when I can't reproduce the error.
MICHAIL MOUDATSOS
RE: Display (javascript?) erros on IE when accessing through reverse proxy
March 1, 2012 4:00 AM
Answer

MICHAIL MOUDATSOS

Rank: Regular Member

Posts: 110

Join Date: October 4, 2011

Recent Posts

Hitoshi Ozawa:
I'm sorry but I have several installations using Apache + mod_jk upfront

I'm not using mod_jk, at least to the best of my knowledge, i.e. there are no LoadModule jk_module libexec/mod_jk.so and AddModule mod_jk.c directives in my httpd.conf file and of course no worker files ctra

I used this Liferay wiki guide as a knowledge base to setup my installation. No such module is used there. Is what am I doing wrong or incomplete and if so, how and in what respect?

My configuration interventions to httpd.conf defaults can be pretty much narrowed to the following
 1...
 2ProxyRequests Off
 3...
 4Listen 443
 5
 6<VirtualHost 10.0.0.101:443>
 7    ServerName 10.0.0.101
 8
 9    SSLEngine on
10    SSLProxyEngine On
11    SSLProtocol all -SSLv2
12    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
13    SSLCertificateFile C:\keystore\signview.crt
14    SSLCertificateKeyFile C:\keystore\10.0.0.101-nopassphrase.key
15
16    RewriteEngine On
17    RewriteCond %{REQUEST_URI} !^/home
18    RewriteCond %{REQUEST_URI} !^/c
19    RewriteCond %{REQUEST_URI} !^/c/portal/logout
20    RewriteCond %{REQUEST_URI} !^/index.html
21    RewriteCond %{REQUEST_URI} !^/image/company_logo*
22    RewriteCond %{REQUEST_URI} !^/image/image_gallery
23    RewriteCond %{REQUEST_URI} !^/html/portal/css*
24    RewriteCond %{REQUEST_URI} !^/group/control_panel
25    RewriteCond %{REQUEST_URI} !^/some-page
26....
27    RewriteCond %{REQUEST_URI} !^/MyPortletProjectName-portlet/image*
28    RewriteCond %{REQUEST_URI} !^/MyThemeProjectName-theme*
29
30    RewriteRule ^ - [L,R=404]
31
32    ProxyPass / https://10.0.0.100:8443/
33    ProxyPassReverse / https://10.0.0.100:8443/
34</VirtualHost>


From tomcat-side I did what the guide described concerning server.xml and WEB-INF/web.xml

and I also set the appropriate values for all web server properties and set all *.https.required properties to true ,although as I said before https has nothing to do with this (the problem exists even without enabling https)

What are the implied functional differences between your approach and mine that might be related to the problem I describe?
Do you think it would be worth to try setting everything up all over again your way? Do you have a link for an elaborate guide of how to do this with Liferay?

Thank you in advance!
Hitoshi Ozawa
RE: Display (javascript?) erros on IE when accessing through reverse proxy
March 1, 2012 2:35 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

The approached outlined uses mod_proxy bundled with Apache http server while I'm using mod_jk. The basic difference is mod_jk that I hink mod_jk is more stable. I haven't had problem using it. emoticon
MICHAIL MOUDATSOS
RE: Display (javascript?) erros on IE when accessing through reverse proxy
March 2, 2012 5:27 AM
Answer

MICHAIL MOUDATSOS

Rank: Regular Member

Posts: 110

Join Date: October 4, 2011

Recent Posts

My page iterator javascript problem was irrelevant as I state here. However I've yet to find a solution for my problems concerning rendering resources such as company logo (resource: /image/company_logo)
MICHAIL MOUDATSOS
RE: Display (javascript?) erros on IE when accessing through reverse proxy
March 2, 2012 6:22 AM
Answer

MICHAIL MOUDATSOS

Rank: Regular Member

Posts: 110

Join Date: October 4, 2011

Recent Posts

OK it seems that IE has some problems with IDs in CSS. Using Opera Dragonfly I found the script that Liferay uses to render the company logo. It contained the .logo class in the #Heading ID, i.e. there was something like
1#Heading .logo{...

I overrode only the .logo class and placed inside all the CSS info that was in the script and it worked!
I know this is a quick n' dirty solution but till I understand what really happens with IE and element ids it ll be just fine...
Note that .logo in my case was not used elsewhere so it was OK to override its definition; other ppl may have to narrow its definition when in another class, like .company-title, that is,
1.company-title .logo{...}

EDIT: When adding the CSS in .logo class make sure to put the appropriate url to the image. You may have to use an image from another path