Quick to teach you Apache + Tomcat + SSL Configuration

Source: Internet
Author: User
Tags config log socket tomcat
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



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.