# 阿里云ECS服务器的端口启用

在阿里云上完成O2OA平台部署，并且启动完成后，有可能因为ECS服务未设置安全策略，未开通入方向上的指定端口导致平台无法正常访问。

在服务器上通过以下命令检测，发现端口是正常开放的

```
netstat -ano | grep 20020
netstat -ano | grep 20030
```

## 1、进入控制台，单击云服务器ECS

![](/files/-LpQnr-Dsktu32ctV25x)

## 2. 单击云服务器

![](/files/-LpQo1Jh6YvkAuWM6M7A)

## 3. 出现您服务器的有关信息，单击更多

![](/files/-LpQo9-ST72UUCBTUxb9)

## 4. 单击安全组配置

![](/files/-LpQoEIFWwALMohc4zkJ)

## 5. 单击配置规则

![](/files/-LpQoO14lMtVqeNU6SHk)

## 6. 在入方向添加安全组规则

![配置允许外部访问的端口](/files/-LpQoUZC93GRRQ9A4bbj)

{% hint style="info" %}
需要开放Web服务器、应用服务器和中心服务器相关的端口，默认为80、20020、20030
{% endhint %}

## 7. 配置详细信息

![](/files/-LpQoorBkbnMunt0ESTq)

参数说明：

```
网卡类型：内网
规则方向：入方向
授权策略：允许
协议类型：自定义TCP
端口范围：20020/20020（填写的端口号）
优先级：1
授权类型：地址段访问
授权对象：0.0.0.0/0（即允许可以访问的ip。填写0.0.0.0/0代表全部可以访问）
描述：自己谁便填
```

{% hint style="info" %}
同理，要连接Nginx这些需要端口的，都需要在这里配置，这样才能在客户端或者是浏览器访问到。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://o2oa.gitbook.io/course/chang-jian-cuo-wu/o2oa-ping-tai-yi-chang/e-li-yun-ecs-fu-wu-qi-de-duan-kou-qi-yong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
