You can export, modify, or import 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, ends with the </DomainConfig>
tag, and include parameters for each website between the <DomainConfig> tag pair.
<DomainConfig>...... </DomainConfig>
is required for each additional website configuration.
Parameter | Description |
---|---|
<Domain>example.aliyundoc.com</Domain> |
The domain name that you want to associate with an Anti-DDoS Pro or Anti-DDoS Premium instance. You can enter only one domain name in a tag pair. |
<ProtocolConfig> <ProtocolList>http,https</ProtocolList> </ProtocolConfig> |
The protocol type of the domain name. You can separate multiple protocol types with commas (,). In this example, the protocol types of the domain name are HTTP and HTTPS. |
<InstanceConfig> <InstanceList>ddoscoo-cn-xxxxxxxxx001</InstanceList> </InstanceConfig> |
The instances that you want to associate with the domain name.
Note Each instance has a unique ID. Enter the instance IDs between the <InstanceList> tag
pair. Separate multiple instance IDs with commas (,).
|
<RealServerConfig> <ServerType>0</ServerType> <ServerList>192.0.XX.XX</ServerList> </RealServerConfig> |
The information of the origin server. The configurations include the following parameters:
Note To associate the domain name of an origin server with an instance, you can use either
the IP address or the domain name of an origin server.
|
Example
<DomainList>
<DomainConfig>
<Domain>example.aliyundoc.com</Domain>
<ProtocolConfig>
<ProtocolList>http,https</ProtocolList>
</ProtocolConfig>
<InstanceConfig>
<InstanceList>ddoscoo-cn-xxxxxxxxx001</InstanceList>
</InstanceConfig>
<RealServerConfig>
<ServerType>0</ServerType>
<ServerList>192.0.XX.XX</ServerList>
</RealServerConfig>
</DomainConfig>
<DomainConfig>
<Domain>demo.aliyundoc.com</Domain>
<ProtocolConfig>
<ProtocolList>http,websocket,websockets</ProtocolList>
</ProtocolConfig>
<InstanceConfig>
<InstanceList>ddoscoo-cn-xxxxxxxxx002,ddoscoo-cn-xxxxxxxxx00d</InstanceList>
</InstanceConfig>
<RealServerConfig>
<ServerType>1</ServerType>
<ServerList>learn.aliyundoc.com</ServerList>
</RealServerConfig>
</DomainConfig>
</DomainList>
- The domain name is example.aliyundoc.com. The protocols are HTTP and HTTPS. The associated instance is ddoscoo-cn-xxxxxxxxx001. 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 associated instances are ddoscoo-cn-xxxxxxxxx002 and ddoscoo-cn-xxxxxxxxx00dddoscoo-cn-xxxxxxxxx001. The domain name of the origin server is learn.aliyundoc.com.