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 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
- First of all, make your way to the ECS Custom Launch page or wizard.
- You will be prompted with four configuration pages. Here, you will have to specify the instance launch configuration.
- 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.
- On the Networking page, you will have to provide Network Type, Network 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.
- 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.
- Finally, give the instance a tag on the Grouping page. Then, click the Next: Preview button.
- 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.
- After that, go through the ECS Terms of Service and then click Create Instance.
- 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.
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.
- Click on the Instance ID to view the instance details page.
- 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.
- Once there, in the top-right corner of the Security Group Rules page, click on the Quick Rule Creation button.
- 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.
- 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
- Go to the Instances page and click the Connect option in front of your instance ID under the Action column.
- You will be prompted with the Enter VNC Password dialog box. Here, click Change VNC Password.
- After that, in the Enter VNC Password dialog box that pops up, enter your password and click OK.
- 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.
- 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
- Click the Connect option in front of the instance ID under the Action column.
- Click Change VNC Password when prompted with the Enter VNC Password dialog box.
- Provide a new password and then hit OK.
- In the top-left corner of the VNC, click on Send Remote Call and then choose CTRL + ALT + DELETE.
- 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.
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.
- First of all, to install Apache, enter the following command at the prompt.
yum install -y vsftpd
- After that, you have to start it up. Enter the following command:
systemctl start httpd
- Once done, you will have to make sure it starts automatically at startup. To do that, enter the following command:
systemctl enable httpd
- Finally, check the status of Apache to see if it is running by entering the following command.
systemctl status httpd
- 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.
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:
- Open up a command prompt and then type powershell to open up a Powershell window.
- To install IIS and the management tools, enter the following command:
Install-WindowsFeature -name Web-Server -IncludeAllSubFeature -IncludeManagementTools
- 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.