In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Linux system apache tomcat virtual host installation configuration is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
I haven't used tomcat for many years. At the request of a friend, I built a virtual host of java environment. After many tests, I now record the configuration that can run normally.
Install jdk
Cd / usr/local
Sh / mnt/mysql/jdk-6u14-linux-i586.bin
Ln-s jdk1.6.0_14/ jdk
Echo "export JAVA_HOME=/usr/local/jdk
Export PATH=$JAVA_HOME/bin:$PATH
Export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib "> > / etc/profile.d/java.sh
Chmod + x / etc/profile.d/java.sh
Install tomcat
Wget http://apache.freelamp.com/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
Tar xzf apache-tomcat-6.0.20.tar.gz-C / usr/local/
Cd / usr/local/
Ln-s apache-tomcat-6.0.20/ tomcat
Vi / .bash_profile
TOMCAT_HOME=/usr/local/tomcat
Export PATH TOMCAT_HOME
Source / .bash_profile
Install jk connector
Wget http://labs.xiaonei.com/apache-mirror/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz
Tar xfz tomcat-connectors-1.2.28-src.tar.gz-C / usr/local/src/
Cd / usr/local/src/tomcat-connectors-1.2.28-src/
Cd native/
. / configure-with-apxs=/usr/local/httpd/bin/apxs
Make
Cp apache-2.0/mod_jk.so / usr/local/httpd/modules/
Apche configuration
Vim / usr/local/httpd/conf/extra/httpd-vhosts.conf
LoadModule jk_module modules/mod_jk.so
Include / usr/local/httpd/conf/mod_jk.conf
JkMountCopy On
ServerName edu.veryi.com
DirectoryIndex index.jsp index.html index.jsp index.htm
DocumentRoot / usr/local/tomcat/webapps/ROOT
# DocumentRoot / usr/local/www/edu.veryi.com/html
#
Order allow,deny
Allow from all
CustomLog "| / usr/local/sbin/cronolog / var/log/httpd/edu.veryi.com-access_log.%Y%m%d" combined
ErrorDocument 404 / missing.html
Vim / usr/local/httpd/conf/mod_jk.conf
JkWorkersFile / usr/local/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile / usr/local/httpd/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"
# servlet and jsp request to send to Tomcat via ajp13's protocol
JkMount / servlet/* worker1
JkMount / * .jsp worker1
-
/ usr/local/httpd/conf/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.socket_keepalive=1
# worker.worker1.socket_timeout=300
Tomcat configuration
Vim / usr/local/tomcat/conf/server.xml
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.