Fórum

Liferay vs Apache 2.4 static css files

thumbnail
Trini Dev, modificado 8 Anos atrás.

Liferay vs Apache 2.4 static css files

Junior Member Postagens: 35 Data de Entrada: 23/04/14 Postagens Recentes
Hi All,

Please see attached.

I have and issue: If Apache2.4 serves static .ccs, jsp or .js files, the error in attached file (Liferay_logs) is generated.
I have copied the (/html and webapps ) folders to the apache ( /htdocs) directory.
Also if Tomcat loads these files, they get loaded fine.

Liferay version 6.2

The aim is to have Apache load all the static content.

Thanks
thumbnail
Wouter Vernaillen, modificado 8 Anos atrás.

RE: Liferay vs Apache 2.4 static css files

Junior Member Postagens: 80 Data de Entrada: 06/06/09 Postagens Recentes
First of all you cannot move the complete html folder to apache as it also contains jsp files.

And I think your JkUnmount directives will only match files in the root folder. Try adding directives like this instead: JkUnmount /html/css/* ajp13
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Liferay vs Apache 2.4 static css files

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Actually Wouter Trini's doing it right for how the CSS/JS/etc used to be handled. It's not moving, it's copying the html dir to apache so it can serve the resources directly. Apache won't serve from the tomcat webapps folder (unless you've really mucked with the directives), so copying html into docroot will allow apache to serve the static resources w/o hitting tomcat.

The problem you have Trini is that Liferay has moved away from static css in lieu of dynamic css compiled by compass.

These days you're better off using a caching appliance such as Varnish between apache and tomcat. Varnish monitors the cache headers for returned data from tomcat and will, in turn, return cached content back to apache when it can.

Varnish is super easy to stand up and you'll notice a huge improvement in performance and no need to worry about jkUnmount directives.
thumbnail
Jack Bakker, modificado 8 Anos atrás.

RE: Liferay vs Apache 2.4 static css files

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
in apache when using mod jk, I use likes of the following

SetEnvIfNoCase Request_URI ^/robots.txt$ no-jk

where if a no-jk url pattern is applicable then apache delivers according to the DocumentRoot path

DocumentRoot /opt/somewhereOverTheRainbowClient

I don't generally use a no-jk to point into the ROOT/html/* and I would think that would also be bad as we look forward into Liferay 7
thumbnail
Trini Dev, modificado 8 Anos atrás.

RE: Liferay vs Apache 2.4 static css files

Junior Member Postagens: 35 Data de Entrada: 23/04/14 Postagens Recentes
Hi David,

Thanks for you reply.

"Varnish is super easy to stand up " this is not the case for the operating system am using Suse SLES 12.
Are there any other catching tool you can recommend.

Thanks
Devon
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Liferay vs Apache 2.4 static css files

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Varnish runs on any flavor of linux.