The first step is to download tomcat to the server. here we use local development as an example. in windows, the same is true in Linux. The second part is to open/conf/server. xml File 1. first find the Connector configuration link parameter [html] & lt; Connectorport & quot; 80 & quot; protocol & quot; HTTP/1.1 & quot; connect
The first step is to download tomcat to the server. here we use local development as an example. in windows, the same is true in Linux.
The second part is to open the/conf/server. xml file.
1. first find the Connector configuration link parameters
[Html]
ConnectionTimeout = "20000"
URIEncoding = "UTF-8"
MaxThreads = "300" enableLookups = "false"
EmptySessionPath = "true"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
There are two main parameters to explain
Port: Tomcat uses port 8080 by default and is changed to port 80, that is, the default http port, so that you can listen to http requests.
URIEncoding
Example: window. location. href = "http://www.abc.com /? Name = "+ encodeURIComponent (" ");
For more information about other parameters, see the article.
2. find the host node and configure the host
[Html]
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
Modify several parameters:
Name: changed from localhost to www.abc.com. this is your domain name.
Add the context node docBase to your war name.
If your configuration file is extracted and put in another directory, you also need to modify catalina. properties
Add:
CONFIG_DIR_PATH = F: \ config (note the delimiter in Linux)
In this way, you can use the CONFIG_DIR_PATH variable in the project.
For example, in Spring
[Html]
File: $ {CONFIG_DIR_PATH}/tag. properties
File: $ {CONFIG_DIR_PATH}/../system-config/tag. properties
So far, Tomcat configuration is complete.
Step 3: bind the host.
Step 4 start access http://www.abc.com
The above configuration is the most basic and simple, not applicable to the production environment ~
Integrate nginx when necessary