Foros de discusión

Liferay vs Apache 2.4 static css files

thumbnail
Trini Dev, modificado hace 8 años.

Liferay vs Apache 2.4 static css files

Junior Member Mensajes: 35 Fecha de incorporación: 23/04/14 Mensajes recientes
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

Archivos adjuntos:

thumbnail
Wouter Vernaillen, modificado hace 8 años.

RE: Liferay vs Apache 2.4 static css files

Junior Member Mensajes: 80 Fecha de incorporación: 6/06/09 Mensajes recientes
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 hace 8 años.

RE: Liferay vs Apache 2.4 static css files

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
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 hace 8 años.

RE: Liferay vs Apache 2.4 static css files

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
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 hace 8 años.

RE: Liferay vs Apache 2.4 static css files

Junior Member Mensajes: 35 Fecha de incorporación: 23/04/14 Mensajes recientes
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 hace 8 años.

RE: Liferay vs Apache 2.4 static css files

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Varnish runs on any flavor of linux.