How to Configure a WebServer (IIS) or Apache on Alibaba Cloud ‘Elastic Compute Service’?

Cloud technology is on the biggest rise of its history and it’s just going to get better from here. Instead of having all the physical hardware, organizations are opting for having a cloud infrastructure instead as it proves to be more cost-efficient without impacting the reliability of the services. Having a cloud network instead of a physical one has become the norm as it is way easier to manage and operate. A cloud infrastructure saves you the time of having to set up and configure every physical equipment. Other than that, performance management tends to be an issue most of the time as networks usually lack the required resources to monitor the health of the network.

Elastic Compute Service – Alibaba Cloud

Elastic Compute Service is an IaaS-level (infrastructure as a service) provided by Alibaba Group. The service offers high performance, thorough reliability, and scalability. You can establish your own infrastructure securely and efficiently on Alibaba Cloud Elastic Compute Service. One of the great features offered by ECS is that you can acquire ECS instances within minutes which enables you to rapidly deploy your services as well as reduces your time to the market. ECS also comes packed with the required tools and functionalities to monitor your network to keep your network performance on track as well as ensure an early resolution to any problems that emerge.

Configuring a WebServer (IIS) and Apache on Alibaba Cloud ECS

Elastic Compute Service (buy here) can be acquired in a starter package on the official website which comes with an ECS cloud server along with a Data Transmission Plan (DTS). You can enroll in a free trial to check out the product if you wish to do so. Once you have created an Alibaba cloud account, you will be prompted to create an ECS instance. We will guide you through the whole procedure.

Creating an ECS Instance

  1. First of all, make your way to the ECS Custom Launch page or wizard.
  2. You will be prompted with four configuration pages. Here, you will have to specify the instance launch configuration.
  3. On the Basic Configuration page, you will have to provide payment methods and where you wish to establish the server. If you wish to establish a Windows instance, choose Windows Server in the Image and if you wish to create a Linux instance, go for a Linux Image. There are various Linux images available like Alibaba Cloud ECS Ubuntu and more.
    Choosing Image
  4. On the Networking page, you will have to provide Network TypeNetwork Bandwidth Billing Method along with a few other options. For the Bandwidth Billing method, Pay-By-Traffic is recommended as in this case, bandwidth is billed on the amount of bandwidth that has been utilized.
  5. Provide the login credentials and give the instance a name on the System Configuration page. This password will be used to connect to the instance later on.
  6. Finally, give the instance a tag on the Grouping page. Then, click the Next: Preview button.
  7. Here, you can preview the configurations that you have provided and change any by clicking the Edit button. You can also save this template by clicking the Save as Launch Template and then providing a name for it.
    Instance Configuration Preview
  8. After that, go through the ECS Terms of Service and then click Create Instance.
  9. The Alibaba Cloud ECS instance will be created and you will be shown the status of the instance. If you wish to connect the ECS instance, copy the Public IP.
    Instance Created

Adding Security Group Rules

If you didn’t add any security group rules while creating the instance, don’t worry as we will show you how to do so now.

  1. Click on the Instance ID to view the instance details page.
  2. On the left-hand side, click on Security Groups. After that, click on the Security group ID to be taken to the security details page.
  3. Once there, in the top-right corner of the Security Group Rules page, click on the Quick Rule Creation button.
  4. Use the configuration details provided in the picture below. For Common Port (TCP), you must choose the port that is to be enabled for all the applications that are to run on the ECS instance. If you wish to choose SSH or Apache, you must select SSH 22 and HTTP 80 as provided in the picture. Also, for the Authorization Object, if you know the requester IP address, provide the specific range of the IP address. Using 0.0.0.0 specifies that devices in all network regions/segments can access the specified port.
    Security Group Rule Creation
  5. Finally, click OK.

Connecting to the ECS Instance

Now that you have added a security group, you can connect to the ECS instance for the first time. The connecting procedure can be a bit different depending on the instance image. We will be covering both Windows and Linux, so you don’t have anything to worry about.

Connecting Linux Instance

  1. Go to the Instances page and click the Connect option in front of your instance ID under the Action column.
  2. You will be prompted with the Enter VNC Password dialog box. Here, click Change VNC Password.
  3. After that, in the Enter VNC Password dialog box that pops up, enter your password and click OK.
  4. Now, you will have to login as root. To do so, provide the username root and enter the password that you had provided while creating the instance.
    Connecting to Linux Instance
  5. Done, you have successfully connected to the instance. In the next step, we will be showing you how to configure Apache.

Connecting to Windows Server Instance

  1. Click the Connect option in front of the instance ID under the Action column.
  2. Click Change VNC Password when prompted with the Enter VNC Password dialog box.
  3. Provide a new password and then hit OK.
  4. In the top-left corner of the VNC, click on Send Remote Call and then choose CTRL + ALT + DELETE.
    Connecting to Windows Server Instance
  5. On the login page of the Windows instance, enter administrator as username and then provide the password that you had entered while creating the instance.

Configuring Apache

Now that you have connected to the instance, it is time to install the latest version of Apache web server and then configure it to run at startup. All you have to do is enter a few sets of commands and voila, you are done.

  1. First of all, to install Apache, enter the following command at the prompt.
yum install -y vsftpd
  1. After that, you have to start it up. Enter the following command:
systemctl start httpd
  1. Once done, you will have to make sure it starts automatically at startup. To do that, enter the following command:
systemctl enable httpd
  1. Finally, check the status of Apache to see if it is running by entering the following command.
systemctl status httpd
  1. After that, open up a new tab in your current web browser and then enter the public IP of the instance to see if everything is operational.
    Testing Apache Server

Configuring IIS 

If you have a Windows Server image, you will have to configure IIS instead of Apache. For that, you will have to first install IIS and the management tools. Here’s how to do this:

  1. Open up a command prompt and then type powershell to open up a Powershell window.
  2. To install IIS and the management tools, enter the following command:
Install-WindowsFeature -name Web-Server -IncludeAllSubFeature -IncludeManagementTools
  1. Once done, open a new tab in your current browser and enter the public IP address of the ECS instance in the address bar and hit Enter to see if everything is working fine.
    Testing IIS

Kamil Anwar


A former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.

Expert Tip

How to Configure a WebServer (IIS) or Apache on Alibaba Cloud ‘Elastic Compute Service’?

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested

Close