Configure an Apache Linux Instance on Alibaba Cloud

Configure Apache Linux Instance in Alibaba Cloud
This article presents the steps to create an Apache Linux instance in the ECS console of Alibaba Cloud.


Alibaba Cloud provides a comprehensive set of global cloud computing services to power Alibaba’s eCommerce ecosystem and other online businesses. Since 2009, Alibaba Cloud has been one of the leading providers in Artificial Intelligence (AI) and cloud computing. Alibaba Cloud offers cloud computing resources and services to thousands of government organizations, developers, and enterprises in more than 200 countries and regions.

This tutorial will walk through the process of configuring an Apache (ecs.g6.large) instance that runs the Linux 2.1903 LTS 64-bit operating system in Alibaba Cloud. One can also go through this tutorial to familiarize themself with operations in the ECS console.



  • First, log in to Alibaba Cloud and create an account.
  • Once the Alibaba Cloud account is created, the system directs the user to add a payment method. Users can add a credit card or PayPal account as payment methods. 
  • After that, users need to complete real-name verifications to purchase ECS instances in the mainland China Region. 
  • Alibaba Cloud offers a default Virtual Private Cloud. If they do not want to use the default VPC, users can create a Virtual Private Cloud and a vSwitch in the region where they want to create an ECS instance.
  • Alibaba Cloud also offers a default security group with its account. If users do not want to use the default security group, they can create a security group in the region where they want to create an ECS instance.


Step 1: Create an ECS Instance 

  • Login to Alibaba Cloud and go to the Custom Launch tab in the ECS console.
  • In the first four steps of the instance creation wizard, complete the instance configurations.
  • We are going to use the following configurations in this tutorial. Users can accept the default settings for parameters that are not mentioned in this tutorial.


Basic ConfigurationsBilling MethodPay-as-you-goThe pay-as-you-go billing method allows more flexible operations.
  • Region: China (Hangzhou)
  • Zone: Random
Once the instance is created, users cannot change the zone or region.
Instance Type
  • Family: General Purpose Type g6
  • Instance Type: ecs.g6.large
Available instance types are determined by the region that the user selects and the region’s resource inventory.

  • Type: Public Image
  • Version: Alibaba Cloud Linux 2.1903 LTS 64-bit
After the instance is created, the application data of the image and the operating system is copied to the system disk.
Networking Virtual Private CloudDefault (vpc-bp1opxu1zkhn00g****)Select an existing VPC.
Public IP AddressAssign Public IPv4 AddressThe system can allocate a public IPv4 address if the user selects the Assign Public IP Address option.
Bandwidth BillingPay-by-trafficIn pay-by-traffic mode, the instance is billed for data transfer over the Internet based on the amount of transferred data.
Peak Bandwidth2 Mbps
Security GroupDefault (sg-bp1bhjjsoiyx44hd****)Select an existing security group.
System ConfigurationsLogin CredentialsPasswordUser must set a password for remote connection and logon to the ECS instance.
Instance NameEcsQuickStart


In this tutorial, EcsQuickStart is used as the instance name.



  • Click the Next: Preview button. Confirm the configurations in the Configurations Selected section or click the icon to modify the configurations in the Preview step.
  • Next, click Save as Launch Template. In the Save as Launch Template dialogue box, set a name and version description for the template. This step is optional.
  • After that, read and agree on ECS Terms of Service. 
  • Finally, click the Create Instance button.
  • After the creation, a message page opens and, on that page, click Console to view the creation progress on the Instances page. If the instance state is running, that means that the ECS instance is created. Copy the public IP address of the instance to use when the user connects to the ECS instance.


Step 2: Add Security Group Rules

If the user didn’t add rules to the default security group or added the instance to a new security group when they created the instance, then perform the following steps:

  • First, click on the instance ID to go to the instance details page.
  • On that page, click Security Groups. Users can click on the ID of a security group to open its detail page.
  • Next, click the Inbound tab on the Security Groups Rules page.
  • Click Quick Add to add security group rules as defined in the below table. Users can accept the default settings for parameters that are not mentioned in this tutorial.


ActionPort RangeAuthorization Object
AllowRDP 3389

SSH 22



  • Finally, click the OK button.


Step 3: Connect to the ECS instance

  • Return to the Instances page and find the EcsQuickStart instance.
  • In the Actions column, select Connect.
  • In the Enter VNC Password dialogue box, click the Modify VNC Password option.
  • Next, modify the Password. In the Enter VNC Password dialogue box, enter the new Password and click OK.
  • Configure the logon credentials.

         – Test login: Enter root.

         – Password: Enter the login password value that the user has set in the Logon Credentials section when creating the instance. Ecs123456 is used in this tutorial.


Configure Apache Linux Instance in Alibaba Cloud 1



Step 4: Configure Apache 

  • First, execute the following command in the terminal to install Apache.
yum install -y httpd


  • After the installation, start Apache.
systemctl start httpd


  • Next, configure Apache to run on system startup.
systemctl enable httpd


Check the status of the Apache to ensure that it is running by executing the following command. If active (running) is returned as the output, Apache is running.

systemctl status httpd


  • After that, open a web page in a browser and hit the below URL. In the below URL, replace <Public IP Address> with the public IP address of the instance.
http://<Public IP Address>


Step 5: View Bills

  • In the top navigation bar, go to Expenses >> User Center.
  • In the left-side navigation panel, select Spending Summary >> Spending Summary. On the Bills page, click the Details tab.
  • Select the instance name from the list (EcsQuickStart) and press ENTER to start the search.



This tutorial presents the steps to create an Apache Linux instance in the ECS console of Alibaba Cloud. Hope this tutorial was useful, and do reach out to us if you have any query or suggestions. 

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Managed Alibaba Cloud Services

Focus on your business & let us take care of your Alibaba Cloud Infrastructure!
From what you are reading, it seems you are interested in Alibaba Cloud and related technologies. If you have a moment to spare, please take a look at our Managed Alibaba Cloud plan, and which might interest you even more!
Managed Alibaba Cloud

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.