How to Change the Environment Configuration of Alibaba Cloud Web Application Hosting Service

Today we will talk about how to make configuration changes in the console deployment environment.

On the home page of the Web+ console, click View All to enter the application and deployment environment list interface.

Select an app from the list that needs to be changed. Click the link to go to the app's details page. On this page, all deployment environments of this application will be displayed, select one of the environments, and click the link to enter.

In the environment page, you can see that some summary information of the deployment environment and recent events are displayed here.

Click the Configuration button in the menu on the left to enter the configuration change page of the environment.

This page contains a lot of options, the first is reverse proxy, because applications are started by non-root users by default, therefore, in Linux systems, these applications cannot listen to port 80.

If the application wants to be accessed by external programs using port 80, an additional reverse proxy is generally used to provide this function. Web+ currently provides two reverse proxy services, Nginx and Apache HTTP server, which can be used according to the actual situation.

Then there is the network configuration. If the application has strict requirements on network division, you can select the corresponding VPC and switch for configuration here.

In the host instance, you can adjust the host specifications, for example, you can choose a host with better performance or use a host with better memory. The number of instances can also be adjusted, for example, we can adjust the number of instances from 1 to 2. In order to save the cost of migrating to the cloud, click me to receive an Alibaba Cloud thousand-yuan voucher, which will be credited when paying.

If the application has special port rule requirements, you can also select an appropriate security group to open different external ports.

In addition, if users log in to the created ECS, they can select a key pair from the list to log in.

Here you can also adjust the size of the system disk. If your application is confirmed to provide services to the outside world, you need to open the external network IP here.

The above are the configuration items of the host instance.

Since the number of hosts has just been adjusted to two ECSs, we need to enable SLB to load balance the traffic of the two host instances.

At this point, you can choose to create a new SLB or use an existing SLB. First choose to create a new SLB, you can choose to set a listening port for SLB, the default is 80, you can also use the SLB protocol, because it is an external service, choose the http protocol.

Similarly, if intranet traffic needs to be load balanced, you can choose to enable intranet SLB.

You can see all the modified configurations, and the color to the left will turn green to show the difference.

Next, adjust the listening port of the service. Because it is a Tomcat service, it will listen to port 8080 by default. Of course, users can also choose other ports.

After that, you can configure health checks, including type, URL, number of retries, interval, and timeout. This information will be used to describe the health of the app.

In the options of environment variables, we can inject some environment variables that the application needs to use, and these variables will be read when the application starts.

Finally, if you need to adjust the parameters of the Java virtual machine, you can click the Java parameters, such as adjusting the GC parameters, stack size, etc.

At this time, if you confirm that the configuration is complete, you can click the Change Configuration button in the upper right corner.

At this point, you can see that there is a summary of the changes.

Let us see the fields and values ​​corresponding to the transformation. After confirming that there are no errors, click OK to submit the changes.

At this point, the environment enters a changing state.

Click the Alerts link to view the events being changed to see what the system is doing.

After a while, our change process is over, which took 101 seconds.

​Close this window and return to the environment overview page, you can see that the access address of the environment has become the access address of the SLB.

Click the address to enter the Demo program. At this point, our environment change configuration is over.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us