Y
youtoo
Unregistered / Unconfirmed
GUEST, unregistred user!
Tomcat+Apache HOWTO
by
Costin Manolache <costin@eng.sun.com>
Anil Vijendran <akv@eng.sun.com>
$Revision: 1.1 $ $Date: 2000/02/08 21:08:34 $
Thisdo
cument describes how to setup Tomcat to run with Apache. For
now thisdo
cument describes how to run Tomcat 3.0 with Apache
1.3.9. Check the section on "Tested Configurations" for other
Apache/Tomcat versions.
------------------------------------------------------------------------
Table of Contents
1. Introduction
2. Installation
2.1 Apache 1.3.9
2.2 Tomcat 3.0
2.3 Testing Your Configuration
2.4 Adding Contexts
3. Tested Configurations
4. More information, feedback, bugs
------------------------------------------------------------------------
1. Introduction
Thisdo
cument is intended to get you started using Tomcat with
Apache until we have Apache and Tomcat as one integrated
release. If you ran into any gotchas while following these
instructions, please let us know so we can keep thisdo
cument
updated.
In the rest of thedo
cument, we use /path/to/apache-1.3.9 to mean
the path to the Apache 1.3.9 installation and /path/to/tomcat3.0
to mean the path to the Tomcat 3.0 installation. We will assume
you are running Apache on the default port (80).
2. Installation
2.1 Apache 1.3.9
*do
wnload and install the Apache 1.3.9 binary for your
platform from
http://www.apache.org/dist/binaries
* Configure the default HTTP listener port in your
/path/to/apache-1.3.9/conf/httpd.conf file.
* Make sure ServerName in /path/to/apache-1.3.9/conf/httpd.conf
contains the name of your host.
* If you are using a version of Apache that you have compiled
yourself and you are using a precompiled version of mod_jserv.so,
make sure that you compiled support for loadable
modules. do
this my compiling mod_so.so using --enable-module=so
with configure.
2.2 Tomcat 3.0
*do
wnload and install Tomcat 3.0 for your OS/platform from
http://jakarta.apache.org/builds/tomcat/release/v3.0/<os>/<platform>
*do
wnload mod_jserv for your platform from
http://jakarta.apache.org/builds/tomcat/release/v3.0/<os>/<platform>/modules
and copy it into /path/to/apache-1.3.9/libexec for a Unix
install and /path/to/apache-1.3.9/modules for a Win32
install.
mod_jserv is the software that allows Apache and Tomcat to
communicate. The port used to communicate is set in the
server.xml file for Tomcat, and tomcat.conf for Apache, and
they must agree. Currently this port defaults to 8007 and
uses the AJP12 protocol.
* Edit /path/to/apache-1.3.9/conf/httpd.conf and add the
following line at the end:
Include /path/to/tomcat3.0/etc/tomcat.conf
* For Win32 users, comment out the line containing libexec/mod_jserv.so
and uncomment out the line containing modules/ApacheModuleJServ.dll.
* It is also important to note that because Tomcat has a
standalone HTTP server built in, it must be run on a
different port than Apache.
2.3 Testing Your Configuration
* Restart Apache (apachectl restart or Apache -k restart on Win32)
* Make sure http://<hostname> is working
* Start Tomcat (Use startup.sh for Unix or startup.bat for
Win32 from /path/to/tomcat3.0)
* Try either http://<hostname>/examples/servets/ or
http://<hostname>/examples/jsp/ to verify it is working.
2.3 Adding Contexts
There's two different ways you can add contexts to this
configuration:
(a)
* Add to /path/to/tomcat3.0/etc/tomcat.conf:
ApJservMount /<context> /root
* restart Apache.
(b)
* Create /path/to/apache-1.3.9/htdocs/<context>
* Install all the files of that context into that
directory.
* Make sure /path/to/tomcat3.0/server.xml points to
/path/to/apache-1.3.9/htdocs/<context>
* Add to /path/to/tomcat3.0/etc/tomcat.conf:
ApJservMount /<context>/servlet /root
<Location /CONTEXT/WEB-INF/ >
AllowOverride None
deny from all
</Location>
3. Tested Configurations
Apache 1.3.9 + Tomcat 3.0 has been tested on the following OSes:
* Linux (RedHat 6.1) on SPARC and Intel
- IBM JDK 1.1.8
* Solaris 2.6 on SPARC
- Sun JDK 1.1.8
- Sun JDK 1.2.2
* Windows NT SP 4
- Sun JDK 1.1.8
- Sun JDK 1.2.2
4. More information, feedback and bugs
Please send bug reports (both on Tomcat and on thisdo
cument) to
tomcat-dev@jakarta.apache.org.
If you tested this on a platform/os that is not listed here, please
either update this file (if you have CVS commit access on Jakarta)
or send a note to tomcat-dev@jakarta.apache.org.
by
Costin Manolache <costin@eng.sun.com>
Anil Vijendran <akv@eng.sun.com>
$Revision: 1.1 $ $Date: 2000/02/08 21:08:34 $
Thisdo
cument describes how to setup Tomcat to run with Apache. For
now thisdo
cument describes how to run Tomcat 3.0 with Apache
1.3.9. Check the section on "Tested Configurations" for other
Apache/Tomcat versions.
------------------------------------------------------------------------
Table of Contents
1. Introduction
2. Installation
2.1 Apache 1.3.9
2.2 Tomcat 3.0
2.3 Testing Your Configuration
2.4 Adding Contexts
3. Tested Configurations
4. More information, feedback, bugs
------------------------------------------------------------------------
1. Introduction
Thisdo
cument is intended to get you started using Tomcat with
Apache until we have Apache and Tomcat as one integrated
release. If you ran into any gotchas while following these
instructions, please let us know so we can keep thisdo
cument
updated.
In the rest of thedo
cument, we use /path/to/apache-1.3.9 to mean
the path to the Apache 1.3.9 installation and /path/to/tomcat3.0
to mean the path to the Tomcat 3.0 installation. We will assume
you are running Apache on the default port (80).
2. Installation
2.1 Apache 1.3.9
*do
wnload and install the Apache 1.3.9 binary for your
platform from
http://www.apache.org/dist/binaries
* Configure the default HTTP listener port in your
/path/to/apache-1.3.9/conf/httpd.conf file.
* Make sure ServerName in /path/to/apache-1.3.9/conf/httpd.conf
contains the name of your host.
* If you are using a version of Apache that you have compiled
yourself and you are using a precompiled version of mod_jserv.so,
make sure that you compiled support for loadable
modules. do
this my compiling mod_so.so using --enable-module=so
with configure.
2.2 Tomcat 3.0
*do
wnload and install Tomcat 3.0 for your OS/platform from
http://jakarta.apache.org/builds/tomcat/release/v3.0/<os>/<platform>
*do
wnload mod_jserv for your platform from
http://jakarta.apache.org/builds/tomcat/release/v3.0/<os>/<platform>/modules
and copy it into /path/to/apache-1.3.9/libexec for a Unix
install and /path/to/apache-1.3.9/modules for a Win32
install.
mod_jserv is the software that allows Apache and Tomcat to
communicate. The port used to communicate is set in the
server.xml file for Tomcat, and tomcat.conf for Apache, and
they must agree. Currently this port defaults to 8007 and
uses the AJP12 protocol.
* Edit /path/to/apache-1.3.9/conf/httpd.conf and add the
following line at the end:
Include /path/to/tomcat3.0/etc/tomcat.conf
* For Win32 users, comment out the line containing libexec/mod_jserv.so
and uncomment out the line containing modules/ApacheModuleJServ.dll.
* It is also important to note that because Tomcat has a
standalone HTTP server built in, it must be run on a
different port than Apache.
2.3 Testing Your Configuration
* Restart Apache (apachectl restart or Apache -k restart on Win32)
* Make sure http://<hostname> is working
* Start Tomcat (Use startup.sh for Unix or startup.bat for
Win32 from /path/to/tomcat3.0)
* Try either http://<hostname>/examples/servets/ or
http://<hostname>/examples/jsp/ to verify it is working.
2.3 Adding Contexts
There's two different ways you can add contexts to this
configuration:
(a)
* Add to /path/to/tomcat3.0/etc/tomcat.conf:
ApJservMount /<context> /root
* restart Apache.
(b)
* Create /path/to/apache-1.3.9/htdocs/<context>
* Install all the files of that context into that
directory.
* Make sure /path/to/tomcat3.0/server.xml points to
/path/to/apache-1.3.9/htdocs/<context>
* Add to /path/to/tomcat3.0/etc/tomcat.conf:
ApJservMount /<context>/servlet /root
<Location /CONTEXT/WEB-INF/ >
AllowOverride None
deny from all
</Location>
3. Tested Configurations
Apache 1.3.9 + Tomcat 3.0 has been tested on the following OSes:
* Linux (RedHat 6.1) on SPARC and Intel
- IBM JDK 1.1.8
* Solaris 2.6 on SPARC
- Sun JDK 1.1.8
- Sun JDK 1.2.2
* Windows NT SP 4
- Sun JDK 1.1.8
- Sun JDK 1.2.2
4. More information, feedback and bugs
Please send bug reports (both on Tomcat and on thisdo
cument) to
tomcat-dev@jakarta.apache.org.
If you tested this on a platform/os that is not listed here, please
either update this file (if you have CVS commit access on Jakarta)
or send a note to tomcat-dev@jakarta.apache.org.