Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to deploy multiple Grails apps on one Tomcat + Apache?
    text
    copied!<p>I've read the several questions on StackOverflow and googled several hours but I can't find a complete and clear answer to my problem of deploying multiple Grails apps on one tomcat 5.5 (with Apache). Maybe someone can push me in the right direction or we can summarize a solution here.</p> <p>The question <a href="https://stackoverflow.com/questions/1805812/deploying-multiple-grails-applications-with-apache-tomcat-virtual-hosts">Deploying multiple grails applications with Apache/Tomcat + Virtual Hosts</a> looked promising but did not work. Maybe I need to do additional changes in Tomcat or Apache?</p> <h2>THE SITUATION:</h2> <p>In the <strong>webapps directory</strong> of Tomcat I have two war-files app1.war and app2.war which are getting unpacked by Tomcat and which I can access via domain1.com/app1 or domain1.com/app2 (I removed a previously used ROOT.war and the associated webapps/ROOT/ directory)</p> <p>In the server.xml of <strong>Tomcat</strong> I have the following hosts: </p> <pre><code> &lt;!-- Logger shared by all Contexts related to this virtual host. --&gt; &lt;Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_" suffix=".log" timestamp="true"/&gt; &lt;!-- Allow symlinks for the tomcat-docs webapp. This is required in the Debian packages to make the Servlet/JSP API docs work. --&gt; &lt;Context path="/tomcat-docs" docBase="tomcat-docs" debug="0"&gt; &lt;Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" /&gt; &lt;/Context&gt; &lt;/Host&gt; &lt;Host name="domain1.com" appBase="webapps/app1" unpackWARs="true" autoDeploy="true"&gt;&lt;/Host&gt; &lt;Host name="domain2.com" appBase="webapps/app2" unpackWARs="true" autoDeploy="true"&gt;&lt;/Host&gt; </code></pre> <p>In <strong>Apache</strong> I have the following virtual hosts: ServerName app1.com</p> <pre><code>JkMount /* default DocumentRoot /var/lib/tomcat5.5/webapps/app1 &lt;directory /var/lib/tomcat5.5/webapps/app1&gt; Options -Indexes &lt;/directory&gt; LogLevel warn ErrorLog /var/www/app1/logs/error.log CustomLog /var/www/app1/logs/access.log common </code></pre> <p></p> <h2>The Problem:</h2> <p>I cannot directly access the two applications via domain1.com and domain2.com - what am I doing wrong?</p> <p>Many thanks in advance,</p> <p>Joerg.</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