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.
An additional tag pair <DomainConfig>......</DomainConfig>
is required for the configurations for each additional website.
Parameter | Description |
| The domain name that you want to add to an instance. You can enter only one domain name in a tag pair. |
| The protocol type of the domain name. In this example, the protocol type of the domain name is HTTP and the port is 80. |
| 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 (,). |
| The information about the origin server. The configurations include the following parameters:
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.