All Products
Search
Document Center

Anti-DDoS:Website configurations in an XML file

Last Updated:Feb 22, 2024

You can import, modify, or export multiple website configurations at a time by using an XML file. This topic describes how to configure a website in an XML file.

Parameters

The website configurations in an XML file start with the <DomainList> tag, end with the </DomainList> tag, and include the parameters for multiple websites between the <DomainList> tag pair. The configurations for each website start with the <DomainConfig> tag, end with the </DomainConfig> tag, and include parameters for each website between the <DomainConfig> tag pair.

Note

An additional tag pair <DomainConfig>......</DomainConfig> is required for the configurations for each additional website.

Parameter

Description

<Domain>example.aliyundoc.com</Domain>

The domain name that you want to add to an instance. You can enter only one domain name in a tag pair.

<ProxyTypeList>

<ProxyConfig>

<ProxyType>http</ProxyType>

<ProxyPorts>80</ProxyPorts>

</ProxyConfig>

</ProxyTypeList>

The protocol type of the domain name. In this example, the protocol type of the domain name is HTTP and the port is 80.

<InstanceConfig>

<InstanceList>ddoscoo-cn-zvp2eibz****</InstanceList>

</InstanceConfig>

The instances to which you want to add the domain name.

Note

Each instance has a unique ID. Include the instance IDs in the <InstanceList> tag pair. Separate multiple instance IDs with commas (,).

<RealServerConfig>

<ServerType>0</ServerType>

<ServerList>192.0.XX.XX</ServerList>

</RealServerConfig>

The information about the origin server. The configurations include the following parameters:

  • <ServerType>0</ServerType>: the IP address of the origin server.

  • <ServerType>1</ServerType>: the domain name of the origin server.

<ServerList>192.0.XX.XX</ServerList>: the addresses of the origin server. Separate multiple addresses with commas (,).

Note

To add the domain name of an origin server to an instance, you can use either the IP address or the domain name of the origin server.

Example

<DomainList>
<DomainConfig>
<Domain>example.aliyundoc.com</Domain>
<ProxyTypeList>
<ProxyConfig>
<ProxyType>http</ProxyType>
<ProxyPorts>80</ProxyPorts>
</ProxyConfig>
<ProxyConfig>
<ProxyType>https</ProxyType>
<ProxyPorts>443</ProxyPorts>
</ProxyConfig>
</ProxyTypeList>
<InstanceConfig>
<InstanceList>ddoscoo-cn-zvp2eibz****</InstanceList>
</InstanceConfig>
<RealServerConfig>
<ServerType>0</ServerType>
<ServerList>192.0.XX.XX</ServerList>
</RealServerConfig>
</DomainConfig>
<DomainConfig>
<Domain>demo.aliyundoc.com</Domain>
<ProxyTypeList>
<ProxyConfig>
<ProxyType>http</ProxyType>
<ProxyPorts>80</ProxyPorts>
</ProxyConfig>
<ProxyConfig>
<ProxyType>websocket</ProxyType>
<ProxyPorts>80</ProxyPorts>
</ProxyConfig>
<ProxyConfig>
<ProxyType>websockets</ProxyType>
<ProxyPorts>443</ProxyPorts>
</ProxyConfig>
</ProxyTypeList>
<InstanceConfig>
<InstanceList>ddoscoo-cn-7pp2e74f****, ddoscoo-cn-2r42e12c****</InstanceList>
</InstanceConfig>
<RealServerConfig>
<ServerType>1</ServerType>
<ServerList>learn.aliyundoc.com</ServerList>
</RealServerConfig>
</DomainConfig>
</DomainList>

In this example, the following website configurations are added:

  • The domain name is example.aliyundoc.com. The protocols are HTTP and HTTPS. The instance to which the domain name is added is ddoscoo-cn-zvp2eibz****. The IP address of the origin server is 192.0.XX.XX.

  • The domain name is demo.aliyundoc.com. The protocols are HTTP, WebSocket, and WebSockets. The instances to which the domain name is added are ddoscoo-cn-7pp2e74f**** and ddoscoo-cn-2r42e12c****. The domain name of the origin server is learn.aliyundoc.com.