Greetings,

 

I apologize for the length/complexity of this but I've learned over the
years providing more detail generally saves time of those who are kind
enough to assist.

 

I have a slew of "standard" webservers which run the usual LAMP model -
CentOS6, Apache 2.2.15-5, MySQL 5.0.77-4, and PHP 5.3.2-6.  I host many
virtual domains and each virtual server runs off a unique directory, roughly
matching the assigned domain name, like so:

 

http://forums.example.com translates to /var/www/html.forums

 

No problems whatsoever, except now one of those virtual domains requires
Tomcat6, and I'm trying to figure out how to integrate Tomcat6 for one
virtual domain only.  This way, all the other domains I host can remain
"as-is" in their working state.

 

Using Yum, I installed Tomcat6 and the various auxiliary RPMs:

 

apache-tomcat-apis-0.1-1.el6.noarch

jakarta-commons-dbcp-tomcat5-1.2.1-13.8.el6.noarch

jakarta-commons-pool-tomcat5-1.3-12.7.el6.x86_64

tomcat6-6.0.24-24.el6_0.noarch

tomcat6-admin-webapps-6.0.24-24.el6_0.noarch

tomcat6-docs-webapp-6.0.24-24.el6_0.noarch

tomcat6-el-2.1-api-6.0.24-24.el6_0.noarch

tomcat6-javadoc-6.0.24-24.el6_0.noarch

tomcat6-jsp-2.1-api-6.0.24-24.el6_0.noarch

tomcat6-lib-6.0.24-24.el6_0.noarch

tomcat6-log4j-6.0.24-24.el6_0.noarch

tomcat6-servlet-2.5-api-6.0.24-24.el6_0.noarch

tomcat6-webapps-6.0.24-24.el6_0.noarch

 

I started Tomcat6, added it to chkconfig so it automatically starts, and as
I expected Tomcat6 answers on port 8009 (ajp) and port 8080 (tomcat).

 

The customer then passed me a forums.war file, stating it needs to be in the
root directory of the virtual server, so I placed it in the
/var/www/html.forums directory.

 

Knowing that apache is answering port 80, and that needs to be forwarded
"up" to port 8080, I made the following changes in the virtual server
configuration, like so:

 

<VirtualHost  *:80>

        Servername      forums.example.com

        DocumentRoot    /var/www/html.forums

        <Directory />

          Options FollowSymLinks

          AllowOverride All

          Order allow,deny

          Allow from all

          ProxyPass ajp://localhost:8009/

        </Directory>

</VirtualHost>

 

Now, when I hit http://forums.example.com, I get the expected Tomcat6
welcome page, but http://forums.example.com/forums.war cannot be found.  I'm
assuming that's because forums.war is located in the virtual directory in
"regular apache" and not where "tomcat apache" is expecting it.

 

I am really confused as what I should be doing next, or even if what I've
done so far was "correct".

 

The goal is to have "regular" apache answer port 80, and call upon "tomcat"
on port 8080 (or 8009 ajp) as required by the web application stored in
"regular" apache's virtual server directory for that domain.

 

 

Reply via email to