Tomcat 4.0 + Apache 1.3 Perfect Integration (JDON netizen)

xiaoxiao2021-03-06  74

Tomcat 4.0 Apache 1.3 perfect integration

Board bridge jdon.com 2001/10

1. Tomcat default JSP file must be placed in an Examples directory, is the JSP file can only be placed under Examples? 2. Can access JSP only access to xxxx.com:8080?

This article discusses how to combine Tomcat and Apache and other script programs such as PHP hybrid usage, if one server only runs JSP, then the solution is simple: just change the 8080 port in Server.xml to 80, or put apache Httpd.conf 80 is changed to 8080 or. You can refer to: USING APACHE TOMCAT 4 Tomcat 3.23 is very good, the related articles are quite a lot, Tomcat 4.0 is different, I have passed the experiment, and I have a solution to solve these two problems. Simply, this way can be combined with apache, assuming that the domain name host is Sign.jdon.com to implement http://sign.jdon.com/ access all JSP files, this result is that many friends hope to achieve, I Let's introduce it. Divide two steps: Configure server.xml and configure httpd.conf:

Configuring Server.xml first introduces the server.xml under Tomcat Conf. Our action is mainly in this: Server.xml has two parts: 1. Service = tomcat-standardalone This is the Tomcat Standard Startup Service, use port 8080 Access 2. Service = Tomcat-Apache This is the Apache integration section, use 80008 port access, and you need to load mod_webapp.so in httpd.conf

Add in the above two service segments (which service joining depends on the need to be Sign.jdon.com:8080 or sign.jdon.com/ access): We want to visit later, just in service = tomcat- Add in Apache:

1. Reloadable = "true" Make sure you upload the bean or servlet to web-inf / class, the system automatically loads the latest .2. Docbase = "" is the actual location of your own JSP directory, if it is Winnt, can be C: / jserv

3. Logger is used to output the / jserv's start-up status alone in a log file here is localhost_jserv_log, this file is in Tomcat's logs directory. Can be used to monitor your / jserv started.

4. Lack of servlet or bean is placed in Web-INF / CLASSES in your own directory. It is recommended that you copy the Web-INF of the Eamples directory. You have to modify this, modify these English articles recommended by Web.xml.

My server.xml is this:

configures httpd. CONF

Set sign.jdon.com The corresponding me directory / home / bqlr / sign / sign.jdon.com is a virtual host name, my deployment method can provide JSP functionality for a specific virtual host domain name: under the confache of your Apache HTTPD.CONF Add:

LoadModule webapp_module libexec / mod_webapp.soAddModule mod_webapp.cWebAppConnection conn warp sign.jdon.com:8008 ServerAdmin webmaster@jdon.comDocumentRoot / home / bqlr / signServerName sign.jdon.com # WebAppDeploy examples conn / examples / WebAppDeploy Sign CONN / 1. This method is suitable for the Apache 1.3 version of Glibc2.1 I am tested in Redhat 7.2 7.1 7.0 6.2 6.1

2. If your Linux is installed, you will download MOD_WEBAPP.SRC yourself to compile it yourself. Before compiling, you must install the APR under its directory. Here is the mod_webapp.so I compiled, you can download directly Copy Under the libexec directory of Apache

3. Use httpd configTest to test httpd.conf can start, if there is an invalid loadModule prompt because your Apache does not use Module = SO compile, recompile other presentations on the Apache network.

4. The easiest way to install the web-inf / class directory under / home / bqlr / sign is Copy -R Tomcat / WEPAPPS / Examples / Web-INF to / Home / BQLR / SIGN, after you compile the bean or servlet After putting this directory, I have time I publish my JSP / Bean programming example.

Finally restart Tomcat and Apache You can use Sign.jdon.com to access all JSP and servlets.

转载请注明原文地址:https://www.9cbs.com/read-109066.html

New Post(0)