I. Ali Cloud server deployment project

1. Log in to the Linux server

2. Download mysql, Tomcat, and JDK and install them

3. Type the project into a WAR package and store it in the Webapps of Tomcat

2. Ali Cloud server open access port

1. Log in to the Management console of ali Cloud server

2. Click to enter the cloud server ECS instance list, as shown in the figure:

3. Click more on the right to configure an IP security group

4. Port 80 (HTTP default access port), port 443 (HTTPS default access port), port 3306 (mysql default access port)

5. After the configuration, enter IP + project path in the browser to access it (ps: Tomcat has port configuration, which will be mentioned later). How to access projects by domain name

3. Aliyun domain name binding IP

1. Aliyun domain name console applies for domain names

2. In the domain name list, you can view the domain name that has been applied for

3. Click “Enter domain name Resolution List”

4. Click Resolution Settings to access the resolution list, and click Add Record to bind the IP address to the domain name

5. Set in sequence:

A

@

The default

Record value: IP address to be bound

Ten minutes

If the setting is successful,

PS: The second record value is just set. The first record value is the domain name bound after the Https SSL security certificate (mentioned later).

6. Click OK to access the project directly through the domain name

4. Configure Https security certificate access

1. Aliyun Certificate application

Ali Cloud Service Console -> Security (Cloud Shield)->SSL certificate

Click “Buy certificate” and select the following for free certificate

Click Buy, fill in the complete information, check the box as prompted by default, and bind the domain name, and the application will be successful

2. Place my order after the application is successful, click Download Certificate, and select Tomcat certificate here

3. Install the Cert certificate to the Tomcat installation directory as prompted

Direct domain name access under HTTP request, port Settings:

Open the server. XML file in the conf directory of tomcat

Edit the connectionTimeout ="20000"

           redirectPort="8443"/ > for the connectionTimeout ="20000"

           redirectPort="8443" />
    
Copy the code

Because 80 is the default port for HTTP requests, you can directly access the domain name

HTTPS request configuration:

Open the server. XML file in the conf directory of tomcat

Looking for”

Change the certificate access path to the following:

protocol="org.apache.coyote.http11.Http11NioProtocol"
SSLEnabled="true"
scheme="https"
secure="true"
keystoreFile="/ usr/local/tools/tomcat, apache tomcat - 9.0.7 / cert/justification of your title. PFX." "
keystoreType="PKCS12"
keystorePass="Your certificate password"
clientAuth="false"
SSLProtocol="TLSv1 + + TLSv1.2 TLSv1.1" 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"/>
Copy the code

Ps: The label here is commented out by default. You can turn off the comment and modify it.

Then, change port 8443 referred to in the file to port 443 (443 is the default request port under HTTPS)

Save the server.xml file and restart the server to access the project over HTTPS.

Directly access the specified page by domain name or Ip address:

The link is too long when accessing the project. How can I access the specified page directly from the configuration file

Open the server. XML file in the

UnpackWARs ="true" autoDeploy="true"> Add:Copy the code

DocBase specifies the absolute path to the specified directory,

Open web.xml, locate the TAB, and set the home page to visit

As follows:

index.html
Copy the code

Here is the index.html page as shown in the figure as my default access page, so I can directly access my home page by domain name or IP.

Final strength preference

Ali cloud to receive free coupon promotion.aliyun.com/ntms/yunpar…

Performance level on power enterprise cloud 】 【 host 2-5 fold promotion.aliyun.com/ntms/act/en…

[the cloud] low cloud host to 4 fold promotion.aliyun.com/ntms/act/qw…

【HI buy 2 off 】 buy cheaper www.aliyun.com/acts/hi-gro…