Apache My operating Environment: Windows2003 Server SP4 + j2sdk1.5.0 + Apache2.0.54 + Tomcat5.5.9
To prepare the software:
1. Install Apache 2.0.54
2, Tomcat 5.5.14
3, JK2 Connector (mod_jk2.so)
One: Configure Apache and Tomcat
Apache installed under D:\Apache2, listening on port 80;
Tomcat under D:\TOMCAT51, listening on port 8080;
Both are installed with Windows 2000 service.
Copy the mod_jk2.so to the D:\Apache2\modules directory:
1. Edit the d:\Apache2\conf\httpd.conf file and add it to the LoadModule section of the code:
LoadModule Jk2_module modules/mod_jk2.so
2. Change the Adddefaultcharset iso-8859-1 to Adddefaultcharset GB2312 so that Apache automatically supports Chinese display;
3. Add in "Virtual Host Configuration Snippet": (This configuration can be modified according to your actual situation)
<virtualhost *:80> ServerAdmin linvsfen 163.com documentroot "d:/ Tomcat51/webapps/jsp-examples ServerName localhost ErrorLog logs/error_log customlog Log Common </VirtualHost>
Write the Workers2.properties file and add the d:\Apache2\conf directory, which reads as follows:
# usually commented out onproduction environments[logger.apache2]file= "D:/apache2/logs/error.log" level=ERROR# Provide the basic config needed[config]file=d:/apache2/conf/workers2.propertiesdebug=1# provide the location of SHM file On the Apache web server[shm]file=d:/apache2/conf/jk2.shmsize=1000000[channel.socket:localhost:8009]port=8009host= Localhost#define the worker[ajp13:localhost:8009]channel=channel.socket:localhost:8009# Map the Tomcat examples WebApp to the WEB server URI spaces [uri:/jsp-examples/*][uri:/*.jsp]
Write a JSP file (sessiontest.jsp), put it under D:\Tomcat51\webapps\jsp-examples, start Apache and Tomcat after reboot, and access http://localhost/ jsp-examples/sessiontest.jsp can be accessed.
[1] [2] Next page