A Simple Method for integrating Apache and Tomcat in Linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. 1. Prepare and download the required files. It is assumed that JDK has been correctly installed and configured.
Download the required files from the Apache Official Website:
Httpd-2.2.0.tar.gz
Apache-tomcat-5.5.12.tar.gz
Jakarta-tomcat-connectors-1.2.15-src.tar.gz
Httpd and jakarta-tomcat-connectors are source code packages and apache-tomcat are Binary packages.
2. install Apache.
Code:
# Tar xzvf httpd-2.2.0.tar.gz
# Cd httpd-2.2.0
#./Configure -- prefix =/usr/local/apache2 -- enable-so
# Make
# Make install
Code:
# Tar xzvf jakarta-tomcat-connectors-1.2.15-src.tar.gz
# Cd jakarta-tomcat-connectors-1.2.15-src/jk/native
#./Configure -- with-apxs =/usr/local/apache2/bin/apxs
# Make
# Cp./apache-2.0/mod_jk.so/usr/local/apache2/modules/
5. configuration.
Create two configuration files mod_jk.conf and workers. properties under/usr/local/apache2/conf.
# Vi mod_jk.conf
Add the following content:
Code:
# 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]"
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/var/wwwroot, So modify DocumentRoot
Code:
DocumentRoot "/var/wwwroot"
Options shortdes FollowSymLinks
AllowOverride None
Order deny, allow
Allow from all
XBitHack on
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.