All Products
Search
Document Center

Simple Application Server:Manage applications on a server that is created based on an application image

Last Updated:Jan 30, 2024

After you create a simple application server based on an application image, you can view preset applications in the application image and manage the applications based on the usage procedure provided in the Simple Application Server console.

Prerequisites

A simple application server is created based on an application image. For more information, see Create a simple application server.

Important

Only if a simple application server is created based on an application image, you can manage preset applications on the server by using the Simple Application Server console.

Background information

In this example, a simple application server that is created based on the LAMP 6.1.0 application image is used. The procedure described in this topic is also applicable to the servers that are created based on other application images. The information that is displayed in the Simple Application Server console takes precedence.

Procedure

  1. Log on to the Simple Application Server console.

  2. In the left-side navigation pane, click Servers.

  3. Click the server ID in the card of the desired server to go to the Server Overview page.

  4. Click the Application Details tab.

    Note

    The Application Details tab is not displayed if the simple application server is created based on an operating system (OS) image.

  5. View application details.

    You can find the following information on the Application Details tab:

    • The information about the image. You can find the status and image version of the server. If you encounter problems during the use of the image, you can click Contact the service provider or View image help documentation to solve the problems.

    • The steps to use the application.

      You can perform these steps to build a website on the server with ease.

      image

    • The information about the application. You can view application information such as the username, password, website root directory, and website home address.

      image.pngFor example, for a server created based on a LAMP application image, you can perform the following operations on the Application Details page:

      • Click the URL next to Home Address to check whether the server is properly configured.

        If the following information is displayed, the Apache service is running as expected.apache服务

      • Click image.png next to Database Password, and then click Connect. In the command line of the remote connection window, paste and run the copied command to query the administrator logon information of the database on the server. mysql信息

    • The installation information of the application. The following figure shows the installation information of the application preset on the server that is created based on the LAMP application image.

      image.png

  6. Configure the application.

    For example, you can create a test web page file in the .html format in the website root directory on the LAMP server and then use the public IP address of the server to access the web page.

    1. In the LAMP Information section, find website root directory /home/www/htdocs and click Connect.

    2. Run the following command to switch to the root user:

      sudo su root
    3. Run the following command to go to the website root directory:

      cd /home/www/htdocs
    4. Run the following commands in sequence to create a test web page file named test.html in the website root directory and write the test information Test001 to the file.

      touch test.html
      echo 'Test001' >> test.html
    5. Enter http://<Public IP address of the simple application server>/test.html in the browser on your on-premises computer to access the file.

      If you add or delete files in the website root directory, you do not need to restart the Apache service to allow the add or delete operation to take effect. If you modify the configuration file of the application, you must restart the Apache service to allow the modifications to take effect.

      Warning

      Restarting the Apache service may interrupt your business. We recommend that you perform this operation during off-peak hours.

      The page shown in the following figure indicates that the web page is accessed.test001

What to do next

You can manually upload actual website projects to the website root directory on the server. If you want to use a website on the server to provide external services, you must bind a domain name to the server and resolve the domain name. For more information, see Bind and resolve a domain name.

Alibaba Cloud provides best practices for building websites for your reference. For example, you can refer to best practices to deploy the Mantis Bug Tracker (MantisBT) system in the LAMP environment or point different domain names to multiple websites deployed on a server. For more information, see Overview.