Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Found the solution!</p> <p>Anonym gave me a good hint about mod_jk. So here the complete configuration (for RHEL5).</p> <p>First of all Download the mod_jk module for apache: <a href="http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/x86_64/" rel="nofollow">http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/x86_64/</a></p> <p>Put in in the modules directory /etc/httpd/modules and make it executeable:</p> <pre><code>chmod +x mod_jk-1.2.31-httpd-2.2.x.so </code></pre> <p>After that create /etc/httpd/conf/workers.properties:</p> <pre><code># Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 </code></pre> <p>The Port 8009 is the where the Glassfish jk connector listens (we come to that later).</p> <p>No we have to configure mod_jk, therefore create the file: /etc/httpd/conf.d/mod_jk.conf with the following content:</p> <pre><code>LoadModule jk_module modules/mod_jk-1.2.31-httpd-2.2.x.so JkWorkersFile /etc/httpd/conf/workers.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send everything for context /atsi-war to worker named worker1 (ajp13) JkMount /yourapp-war/* worker1 </code></pre> <p>(This means everything from your <a href="http://apache.webserver.com/yourapp-war/" rel="nofollow">http://apache.webserver.com/yourapp-war/</a> will bi redirected to Glassfish yourapp-war application context)</p> <p>Important, if you are using virtual hosts on apache, you have to set the option: JkMountCopy On for your virtual servers. Explication:</p> <blockquote> <p>If this directive is set to "On" in some virtual server, the mounts from the global server will be copied to this virtual server, more precisely all mounts defined by JkMount or JkUnMount.</p> </blockquote> <p>Now we have to create the jk connecter in glassfish:</p> <pre><code>asadmin create-http-listener --listenerport 8009 --listeneraddress 0.0.0.0 --defaultvs server jk-connector asadmin set configs.config.server-config.network-config.network-listeners.network-listener.jk-connector.jk-enabled=true </code></pre> <p>Restart Glassfish, and everything sould work.</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