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

Detailed explanation of the usage of position attribute in HTML (four types)

The four property values ​​of position are: 1.rel...

Learn more about the most commonly used JavaScript events

Table of contents JavaScript events: Commonly use...

Implementation of waterfall layout in uni-app project

GitHub address, you can star it if you like it Pl...

mysql error number 1129 solution

SQLyog connects to mysql error number 1129: mysql...

Tips for creating two-dimensional arrays in JavaScript

Creation of a two-dimensional array in Js: First ...

MySQL learning tutorial clustered index

Clustering is actually relative to the InnoDB dat...

How to deploy hbase using docker

Standalone hbase, let’s talk about it first. Inst...

Implementation of MySQL joint index (composite index)

Joint Index The definition of the joint index in ...

CocosCreator Skeleton Animation Dragon Bones

CocosCreator version 2.3.4 Dragon bone animation ...

Practical solution for Prometheus container deployment

environment Hostname IP address Serve Prometheus ...

A brief discussion on when MySQL uses internal temporary tables

union execution For ease of analysis, use the fol...

MySQL Series 10 MySQL Transaction Isolation to Implement Concurrency Control

Table of contents 1. Concurrent access control 2....

Detailed explanation of the problem of configuring servlet url-pattern in tomcat

When configuring web.xml for tomcat, servlet is a...