cloud.tencent.com
is used as an example.tomcat9.0.40
version 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. |
/usr
directory. For example, if the Tomcat folder name is tomcat9.0.40
, /usr/*/conf
is actually /usr/tomcat9.0.40/conf
.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_tomcat
folder.cloud.tencent.com_tomcat
cloud.tencent.com.pfx
: certificate filekeystorePass.txt
: password file (if you have set a private key password, this file will not be generated)cloud.tencent.com.pfx
certificate file from the local directory to the /usr/*/conf
directory.server.xml
file in the /usr/*/conf
directory by using either of the following methods as needed:Connector
attribute in the server.xml
file to the following:<Connector port="443"protocol="HTTP/1.1"SSLEnabled="true"scheme="https"secure="true"keystoreFile="/usr/*/conf/cloud.tencent.com.pfx" # Path of the certificate filekeystoreType="PKCS12"keystorePass="Certificate password" # Replace the value with the content in the `keystorePass.txt` password file.clientAuth="false"SSLProtocol="TLSv1.1+TLSv1.2+TLSv1.3"ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256"/>
Connector
attribute in the server.xml
file to the following:<Connectorprotocol="org.apache.coyote.http11.Http11NioProtocol"port="443" maxThreads="200"scheme="https" secure="true" SSLEnabled="true"keystoreFile="/usr/*/conf/cloud.tencent.com.pfx" keystorePass="Certificate password" # Replace `pfx` with the path of the certificate file, and replace `Certificate password` with the content in the `keystorePass.txt` password file.clientAuth="false" sslProtocol="TLS"/>
keystorePass.txt
file in the cloud.tencent.com_tomcat
folder./usr/*/bin
directory to shut down and restart it../shutdown.sh (Shut down the Tomcat server)./startup.sh (Start the Tomcat server)
/usr/*/bin
directory to start it../startup.sh
https://cloud.tencent.com
.web.xml
file in the /usr/*/conf
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 /usr/*/conf
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" />
/usr/*/bin
directory:./shutdown.sh
./configtest.sh
http://cloud.tencent.com
../startup.sh
Was this page helpful?