Solution to the problem that Alibaba Cloud host cannot access the website using IP (solved by configuring security group rules)

Solution to the problem that Alibaba Cloud host cannot access the website using IP (solved by configuring security group rules)

I just bought an Alibaba Cloud host and couldn’t wait to try out its speed. However, I couldn’t access the website, either using the IP or binding the domain name. After submitting a work order, I found out that I needed to configure security group rules. For novices like me, this article will introduce how to configure security group rules after activating the Alibaba Cloud host so that the website can be accessed from the Internet.

1. Open the security group management interface

The location of the security group management interface is Menu- > Network & Security- > Security Group . Here you can create a security group instance (if you haven't created an instance yet) or configure security group rules (if you have already created an instance when you purchased the host).

Security Group Management

Security Group Management (click on the image to enlarge)

Click " Configure Rules ". If you have not created an instance yet, you need to create one first.

2. Configure security group rules

On the security group rule configuration page, in the Inbound direction tab, click Manually add. Then configure it as shown below:

  • Authorization policy: Allow
  • Priority: 1
  • Protocol type: Custom TCP
  • Port range (destination): HTTP(80)
  • Authorization object (source): 0.0.0.0/0

Add security group rules

Add security group rules (click on the image to enlarge)

Click "Save" to complete the configuration.

At this time, you can use the IP or domain name (if it has been bound) to access the Alibaba Cloud host on the external network.

Old version - Alibaba Cloud adds security group rules

If it is an old version of Alibaba Cloud Console, the operation interface is as shown below, but the content is the same as above.

Old version - Alibaba Cloud adds security group rules

Old version - Alibaba Cloud adds security group rules (click on the image to enlarge)

The following is the supplement from xiaopeng147258

I have built a web service on Alibaba Cloud's ECS cloud host (centos7), but I cannot access my website through the external network IP.

First, you need to install the http service via yum install httpd -y

Then start the http service via systemctl start httpd

Of course, you can also set it to automatically start the httpd service at boot time via systemctl enable httpd

After the http service is turned on, if the firewall rules have been configured, you need to set the firewall to allow port 80

firewall-cmd --zone=public --add-port=80/tcp

Finally, after all these are done, it is the key step

Since the Alibaba Cloud host has port 80 closed by default, first log in to Alibaba Cloud and enter the management console

Select products and services

Then select the instance

At this time, you can see your own instance, and then click Management on the right to enter the instance details.

The core part is to click the security group of this instance, then click the security group list, and then configure the rules.

At this time, you can click Configure Rules, then click Add Group Rules, and the following interface will appear.

Note: At this time, many people may think, I originally planned to access it from the outside, but this is the rule of the intranet, which means it is still useless. In fact, this is what I am wondering about. After checking the usage documentation of Alibaba Cloud, I found that this is a vpc dedicated network, so the default is the intranet configuration. After modification, it is also valid for the external network, while the classic network needs to select the external network!

As a novice of Alibaba Cloud Host, I was unable to access WEB services after setting up the LAMP environment on the cloud host for the first time. Although I have played with LAMP on a virtual machine before, the actual environment is still very different. I have searched many blogs on the Internet but couldn’t find any practical solutions. In order to help more novice friends like me avoid detours, I wrote this blog.

This is also my first time writing a blog, so if any big guys see it, please give me more advice. I will work harder in the future to share with you the holes I have filled. Thank you all the big guys here. . . . . .

You may also be interested in:
  • Detailed explanation of adding security group rules to Alibaba Cloud Server (graphic tutorial)

<<:  Binary Search Tree Algorithm Tutorial for JavaScript Beginners

>>:  MySQL 8.0.20 installation and configuration method graphic tutorial

Recommend

MySQL index for beginners

Preface Since the most important data structure i...

Mysql specifies the date range extraction method

In the process of database operation, it is inevi...

How to view MySQL links and kill abnormal links

Preface: During database operation and maintenanc...

Use of marker tags in CSS list model

This article mainly introduces the ::master pseud...

How to modify the ssh port number in Centos8 environment

Table of contents Preface start Preface The defau...

4 ways to view processes in LINUX (summary)

A process is a program code that runs in the CPU ...

How to reduce the root directory of XFS partition format in Linux

Table of contents Preface System environment Curr...

Node.js sends emails based on STMP protocol and EWS protocol

Table of contents 1 Node.js method of sending ema...

Detailed tutorial on compiling and installing MySQL 5.7.24 on CentOS7

Table of contents Install Dependencies Install bo...

5 basic skills of topic page design (Alibaba UED Shanmu)

This topic is an internal sharing in the second h...

Example analysis of MySQL startup and connection methods

Table of contents How to start mysqld Method 1: m...

Json advantages and disadvantages and usage introduction

Table of contents 1. What is JSON 1.1 Array liter...