cloud.tencent.com
is used as an example.Item | Description |
Server IP address | IP address of the server, which is used to connect the PC to the server. |
Username | The username used to log in to the server. |
Password | The password used to log in to the server. |
cloud.tencent.com
certificate file package to the local directory.
After decompression, you can get the certificate file of the corresponding type, which includes the cloud.tencent.com_jks
folder.cloud.tencent.com_jks
cloud.tencent.com.jks
: keystore filekeystorePass.txt
: password file (if you have set a private key password, this file will not be generated)cloud.tencent.com.jks
to the conf
directory of the Tomcat installation directory.server.xml
file in the conf
directory by adding the following:<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"maxThreads="150" scheme="https" secure="true"# Path of the certificatekeystoreFile="Tomcat installation directory/conf/cloud.tencent.com.jks"# Keystore passwordkeystorePass="******"clientAuth="false"/>
server.xml
file, see below:server.xml
directly.<?xml version="1.0" encoding="UTF-8"?><Server port="8005" shutdown="SHUTDOWN"><Listener className="org.apache.catalina.startup.VersionLoggerListener" /><Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /><Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /><Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /><Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /><GlobalNamingResources><Resource name="UserDatabase" auth="Container"type="org.apache.catalina.UserDatabase"description="User database that can be updated and saved"factory="org.apache.catalina.users.MemoryUserDatabaseFactory"pathname="conf/tomcat-users.xml" /></GlobalNamingResources><Service name="Catalina"><Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /><Connector port="443" protocol="HTTP/1.1"maxThreads="150" SSLEnabled="true" scheme="https" secure="true"clientAuth="false"keystoreFile="Tomcat installation directory/conf/cloud.tencent.com.jks"keystorePass="******" /><Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /><Engine name="Catalina" defaultHost="cloud.tencent.com"><Realm className="org.apache.catalina.realm.LockOutRealm"><Realm className="org.apache.catalina.realm.UserDatabaseRealm"resourceName="UserDatabase"/></Realm><Host name="cloud.tencent.com" appBase="webapps"unpackWARs="true" autoDeploy="true" ><Context path="" docBase ="Knews" /><Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"prefix="localhost_access_log" suffix=".txt"pattern="%h %l %u %t "%r" %s %b" /></Host></Engine></Service></Server>
keystorePass.txt
file in the Tomcat folder.bin
directory of the Tomcat installation directory to shut down and restart it:shutdown.bat (Shut down the Tomcat server)startup.bat (Start the Tomcat server)
bin
directory of the Tomcat installation directory to start it:startup.bat
web.xml
file in the conf
directory of the Tomcat installation directory and find the <\\/welcome-file-list>
tag.<\\/welcome-file-list>
and add the following:<login-config><!-- Authorization setting for SSL --><auth-method>CLIENT-CERT</auth-method><realm-name>Client Cert Users-only Area</realm-name></login-config><security-constraint><!-- Authorization setting for SSL --><web-resource-collection><web-resource-name>SSL</web-resource-name><url-pattern>/*</url-pattern></web-resource-collection><user-data-constraint><transport-guarantee>CONFIDENTIAL</transport-guarantee></user-data-constraint></security-constraint>
server.xml
file in the Tomcat installation directory by changing the redirectPort
parameter to the port of the SSL connector, i.e., port 443, as shown below:<Connector port="80" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="443" />
/bin
directory of the Tomcat installation directory to shut down the Tomcat server:shutdown.bat
configtest.bat
https://www.tencentcloud.com/
.startup.bat
Was this page helpful?