SOS's dear friend gave an integrated approach to apache + tomcat + connectors

Source: Internet
Author: User
The SOS guy gave an integrated method of apache + tomcat + connectors-Linux Enterprise Application-Linux server application information. The following is a detailed description. You have installed apache, Jdk, tomcat, and mod_jk.so.
Configure # mod_jk.conf and workers. properties
Configure mod_jk.conf as follows:
# Point out the location of the workers. properties file required for mod_jk module work
JkWorkersFile/usr/local/apache2/conf/workers. properties
# Where to put jk logs
JkLogFile/usr/local/apache2/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[% a % B % d % H: % M: % S % Y]"
# JkOptions indicate to send ssl key size,
JkOptions + ForwardKeySize + ForwardURICompat-ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "% w % V % T"
# Send all servlet and jsp requests to Tomcat through the ajp13 protocol for Tomcat to process
JkMount/servlet/* worker1
JkMount/*. jsp worker1

Set workers. properties:
# Defining a worker named worker1 and of type ajp13
Worker. list = worker1
# Set properties for worker1
Worker. worker1.type = ajp13
Worker. worker1.host = localhost
Worker. worker1.port = 8009
Worker. worker1.lbfactor = 50
Worker. worker1.cachesize = 10
Worker. worker1.cache _ timeout = 600
Worker. worker1.socket _ keepalive = 1
Worker. worker1.socket _ timeout = 300

Configure httpd. conf and make the following changes:
Change Listen 80 to Listen 127.0.0.1: 80
Change ServerName to ServerName LocalHost: 80
Add index. jsp to DirectoryIndex
My webpage is stored in/usr/local/tomcat/webapps, So modify DocumentRoot
DocumentRoot "usr/local/tomcat/webapps/web"

Options shortdes FollowSymLinks
AllowOverride None
Order deny, allow
Allow from all
XBitHack on


Add the statement about loading mod_jk:
LoadModule jk_module modules/mod_jk.so
Include/usr/local/apache2/conf/mod_jk.conf

Configure the VM as follows:
NameVirtualHost *: 80
VirtualHost 127.0.0.1: 80>
ServerAdmin qhdwhl@yahoo.com.cn
DocumentRoot/usr/local/tomcat/webapps/web
ServerName www.myweb.com
UserDir "/usr/local/tomcat/webapps/web"
JkMount/*. jsp ajp13
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common


Order allow, deny
Deny from all


However, the website still cannot run.
Let's see if the settings are incorrect.

[ This post was last edited by qhdwhl at,-12-4.]
Related Article

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.