Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have a similar setup, just Tomcat instead of Glassfish, and maven to build everything. Here's how it works. Apache httpd and Tomcat are connected with mod_jk. Apache forwards all requests to Tomcat except for the GWT module dir (lets call it gwt_module), which contains all the GWT compiled stuff - that gets served by Apache and is configured to be cached. The rest - servlets basically, gets forwarded to Tomcat (RPC, RequestFactory, other servlets). MongoDB as a database server.</p> <p>Here's the relevant httpd.conf section:</p> <pre><code>JkMount /* webbalancer JkUnMount /gwt_module/* webbalancer Alias /gwt_module "/srv/web/app_servers/tomcat-1/webapps/ROOT/gwt_module/" &lt;Directory "/srv/web/app_servers/tomcat-1/webapps/ROOT/gwt_module/"&gt; Order deny,allow allow from all Options -Indexes &lt;FilesMatch "\.cache\.*"&gt; Header set Cache-control max-age=31536000 # Header unset ETag # FileETag None &lt;/FilesMatch&gt; # turning off ETags, to force browsers to rely only on Cache-Control and Expires headers. # for some reason, FF wasn't using the cache for JS files if ETags are on. Header unset ETag FileETag None &lt;/Directory&gt; # Tell clients to keep images in the cache ExpiresActive On ExpiresByType image/x-icon A2592000 ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 #ExpiresByType application/x-javascript A2592000 ExpiresByType text/css A2592000 ExpiresByType application/xhtml+xml A2592000 # Compress output for text AddOutputFilterByType DEFLATE text/html text/xml text/css application/x-javascript text/javascript application/javascript </code></pre> <p>Note: I'm not sure that serving static files with apache is faster than serving everything with only tomcat, I use apache for load balancing primarily. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload