There is a problem with port number collisions when deploying multiple tomcat on the same server, so you need to modify the Tomcat configuration file Server.xml, as an example of TOMCAT7.
First, learn about several of the main ports of the following Tomcat:
Where 8080 is an HTTP port and 8443 is an HTTPS port8005 for remote Stop service port8009 is the AJP port, Apache can access the 8009 port of Tomcat over the
;reloadable If this property is set to True, the Tomcat server will monitor the change of class files in the web-inf/classes and Web-inf/lib directories while running. If you monitor that a class file is updated, Server self-reloading web App3GT;COOKIES Specifies whether to use cookies to support session, the default value is True4>usenaming Specifies whether Jndi is supported, the default value for true in the The .Enablelookups= "false" redirectport= "8443" acceptcount= "debug=" 0 "connectiont
in the book is a little different for ubuntu12.04. The following is a summary of the experience for your reference:
Install apache and tomcat and install mod_jk (sudo apt-get install libapache2-mod-jk.
I. AJP Connector
Tomcat 6 provides the AJP Connector implementation for the AJP protocol as a java class, which is included in the Tomcat release version. First
; Deny all; }}} directive Syntax:check interval=milliseconds [Fall=count] [Rise=count] [timeout=milliseconds] [default_down=true|false] [TYPE=TCP|HTTP|SSL_HELLO|MYSQL|AJP] [port=Check_port] Default: If there are no configuration parameters, the defaults are: Interval=30000Fall=5Rise=2timeout= +default_down=trueType=tcpcontext:upstream This instruction can open the Health check function of the backend server. The parameter meaning behind the dir
can set it up with the number of threads calculated by the memory formula, get the best number of threads by pressing and calculating, and then set the number of threads.To set the number of threads:Best thread Count For example, by measuring the optimal number of threads for a system is 10, and then the number of threads calculated through memory is 20, it is possible to set the number of threads for JBoss to 15, if 10 is set directly, as the system itself is subject to changes in some depende
Guide
Tomcat is a core project of the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals. With Sun's involvement and support, the latest servlet and JSP specifications are always reflected in Tomcat, and Tomcat 5 supports the latest servlet 2.4 and JSP 2.0 specifications. Because of the advanced Tomcat technology, stable performance, and free, so deeply loved by Java enthusiasts and have been recognized by s
/mod_proxy_balancer.soLoadModule Proxy_connect_module modules/mod_proxy_connect.soLoadModule Proxy_ftp_module modules/mod_proxy_ftp.soLoadModule Proxy_http_module modules/mod_proxy_http.soThe comments in front of this section of code are released.2. Simultaneously release the comment at the same time.# Virtual Hostsinclude conf/extra/httpd-vhosts.conf(3) Add code at the end of the file proxyrequests Off proxy balancer://cluster > Span style= "color: #000000;" > Balancermember
Combine the previous http://www.bkjia.com/ OS /201511/112841.html, and continue the resources of the separation site to go to different sites
If a java site uses a tomcat server, the css, images, and js of the site must be separated. If you use different domain names, you will encounter cross-domain situations. Therefore, apache proxy is used for separation.
Put all css, images, and js Resources
Src.test.com/css /......
Src.test.com/images /......
Src.test.com/js /......
Java site tomca
Balancing tomcat using the Mod_proxy module1. You can still edit on 19.66, using the HTTP protocol:cd/etc/httpd/conf.d/MVHttpd-jk.conf httpd-Jk.conf.bakvim httpd-proxy.conf-------------------------------------------------------------->//lb1>Balancermember http://192.168.19.66:8080 loadfactor=1 Route=tomcataBalancermember http://192.168.19.74:8080 loadfactor=1 ROUTE=TOMCATBProxyset lbmethod=byrequests//scheduling the number of statistics requests based on weightsProxypass/balancer://lb1/Proxypas
".Garbled characters may occur when the server button uploads a Chinese file.Solution:The solution is basically the same as the solution of Problem 1, but you only need to addUpload. setHeaderEncoding ("UTF-8.Question 3:When you click "insert/edit image" or "insert/edit Flash", Click Browse in the pop-up dialog box.The "Browse server" page appears. If you want to use the "Create New Folder" button in the pageWhen you create a Chinese directory, the Chinese directory is garbled.Solution:The enco
attention to several points:1) shutdwon Server port, if you are booting multiple tomcat on a single machine, this port should be as different as possible.2) port= "8081" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/>Note that this protocol and this port, this is the port where you stand alone, after a single tomcat boot, to access Tomcat. namely: http://localhost:8081/webapplication/index.jsp.Redirectport= "8443" This can be used for a while, Tomcat does not start the Ss
JK, Jk_proxy, Http_proxyIi. comparison of Mod_proxy and MOD_JKSo when do you use which one? This depends on your architecture. If you already have or need Apache 2.2 features, then you can mod_proxy and mod_jk directly choose. MOD_JK is well allowed on the apache2.2. The key to see what features you need:Mod_proxy--------------Advantage:There is no need to compile and maintain an opposing module. Mod_proxy,mod_proxy_http,mod_proxy_ajp,mod_proxy_balancer is already the standard integration part
Let ' s encrypt is a free SSL certificate distribution project, the issuance of certificates have been supported by the mainstream browser, pro-test Google browser (desktop version), Firefox (desktop version), UC Browser (mobile version), 360 browser (mobile version) support, the other temporarily not tested;This article explains how to use let's encrypt to get a free SSL certificate, configure the Apache SSL feature, and forward the request to TomcatThe general idea is as follows:1. Obtain an S
tested version 8.0 here.
Decompress the downloaded package
Mv apache-tomcat-8.0.30/usr/local/tomcat1
Cd/usr/local/bin
Vim catalina. sh
Add a line: CATALINA_HOME =/usr/local/tomcat1/
Grant file executable permissions
Chmod + x *. sh
StartTomcat
/Usr/local/tomcat1/bin/catalina. sh start
Enter:Http: // localhost: 8080/
YesTomcatPage,The installation is successful.
Deploy multiple tomcat servers on the Current Machine
To deploy multiple tomcat servers on one machine, you only need to modify t
Let's Encrypt + Apache + Tomcat for free HTTPS
Let's Encrypt is a free SSL Certificate release project. The issued certificate has been supported by mainstream browsers, including Google browser (desktop edition) and Firefox browser (desktop edition) UC browser (mobile edition), 360 browser (mobile edition) support, other are not tested yet;
This article explains how to use Let's Encrypt to obtain a free SSL Certificate, configure the SSL feature of apache, and forward requests to tomcat
The gen
can also is used by Userdatabaserealm to authenticate users--That share a single"Container" note:a "Service" is not itself A "Container"define subcomponents such as"Valves" at ThisLevel . Documentation at/docs/config/service.html--MaxThreads= "Minsparethreads=" "4"/>-Represents an endpoint by which requests is received and responses are returned . Documentation At:java HTTP Connector:/docs/config/http.html (Blocking non-blocking) Java AJP Connector:
Configuration:useaprconnector [false], Useopenssl [true]22-aug-2017 15:25:35.559 info [main] Org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k Jan 2017]22-aug-2017 15:25:35.663 info [main] org.apache.coyote.AbstractProtocol.init Initializing Protocolhandler [" http-nio-8080 "]22-aug-2017 15:25:35.771 information [main] Org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read22-aug-2017
口为8080, AJP for 8089,shutdown port for 8005Tcp0 0:::8080:::* LISTEN2150/java TCP0 0:: FFFF:127.0. 0. 1:8005:::* LISTEN2150/java TCP0 0:::8009:::* LISTEN2150/java# catalina.sh VersionUsing catalina_base:/usr/Local/tomcat Using catalina_home:/usr/Local/tomcat Using Catalina_tmpdir:/usr/Local/tomcat/temp using jre_home:/usr using CLASSPATH:/usr/Local/tomcat/bin/bootstrap.jar:/usr/Local/tomcat/bin/tomcat-juli.jar Serverversion: Apache tomca
of Tomcat.
JK is the most commonly used Apache and Tomcat connection, the latest version is JK-1.2.37 released, JK is through the AJP protocol with the Tomcat server communication, tomcat default AJP Connector port is 8 009. JK itself provides a monitoring and management of the page jkstatus, through Jkstatus can monitor the current working status of JK and the connection to Tomcat settings, Access can be
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.