![]() JkLogFile d:/myproject/tomcat/logs/mod_jk.log # Update this path to match your logs directory location JkWorkersFile d:/myproject/tomcat/conf/workers.properties # Update this path to match your conf directory location # Update this path to match your modules location Step 2: Configure Apache - We need to configure the Apache HTTP Server to load and initialize the JK module.Ĭreate a configuration file called " mod_jk.conf" as follows and place it in " d:\myproject\tomcat\conf": Rename the downloaded module to " mod_jk.so" and move into directory " d:\myproject\apache\modules". ![]() Step 1: Download the Apache-Tomcat Connector Module -Īn Apache-Tomcat connector - JK1.2 module - which is an adapter module used by Apache to communicate with Tomcat (using AJP v1.3 protocol through TCP port 8009), can be downloaded from Tomcat mother site (⇒ Download ⇒ Tomcat Connectors ⇒ JK 1.2 ⇒ JK 1.2 Binary Releases ⇒ win32 ⇒ jk-1.2.xx ⇒ " mod_jk-1.2.xx-httpd-2.2.x.so"). I shall denote Tomcat's installed directory as $CATALINA_HOME (Catalina is the code name for Tomcat 5 and above). Tomcat's shall contains two web contexts: " /examples" (Tomcat's servlets and JSP examples) and " /ws" (to be created by you). I shall assume that Tomcat is installed in directory " d:\myproject\tomcat", runs on port 8080. I shall denote the apache installed directory as $APACHE_HOME. I shall assume that Apache is installed in directory " d:\myproject\apache", and runs on port 7000. I will only describe the JK1.2 module with Apache 2 here. There are a few adapter modules available, such as Apache JServ Protocol (AJP) v1.2 "JServ" module (outdated), AJP v1.3 "JK 1.2" module (in use) and "JK 2" module (deprecated). If so, it lets the adapter takes the request and forwards it to Tomcat, as illustrated below. When Apache receives an HTTP request, it checks if the request belongs to Tomcat.Apache needs to load a "adapter" module, which uses a certain protocol, such as Apache JServ Protocol (AJP), to communicate with the Tomcat, via another TCP port (port 8009 in the default configuration).To configure Tomcat to work with Apache HTTP Server, you should first read the documentation provided in Tomcat thoroughly, and read the "Tomcat Connector" documents. Read "Why should I integrate Apache with Tomcat? (or not)" at Tomcat FAQ ( ). In this combination, Tomcat executes the Java servlets and JSPs, the Apache serves the static HTML pages and performs other server-side functions such as CGI, PHP, SSI, etc. Tomcat can also be run as an add-on to the Apache HTTP Server (or Microsoft IIS) - as the Java servlet/JSP container. Tomcat can be run as a standalone server. Apache 2 with Tomcat 6 How To Configure Tomcat to work with Apache How to Connect Tomcat 6 to Apache HTTP Server 2 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |