Teach you to quickly configure Apache+tomcat+ssl

Source: Internet
Author: User
Tags config socket tomcat

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)

First, 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 logs/access_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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.