Custom web server settings that are applied to all plan subscriptions are defined by the web-server-settings node. This node is specified by complex type webServerSettings (domain_template.xsd) . This type is structured as follows:

image 76234

  • The additional node is optional. It specifies additional directives for HTTP. Data type: string.
  • The additional-ssl node is optional. It specifies additional directives for HTTPs. Data type: string.
  • The additional-nginx node is optional. It specifies additional directives for nginx. Data type: string.
  • The restrict-follow-sym-links node is optional. It allows to restrict the ability to follow symbolic links to improve the server security. If it has the true value, the users are prohibited to use the FollowSymLink directive in the .htaccess file. Data type: string. Allowed values: true, false.
  • The nginx-proxy-mode node is optional. It specifies whether nginx acts as a proxy for Apache when both of them process HTTP requests for websites’ content or whether nginx processes requests on its own. The default mode is true. To make nginx handle all requests without Apache, specify the false value. Data type: string. Allowed values: true, false.

The following sample packet creates a service plan, sets the additional directive for HTTP to use an error page, and restricts the ability to follow symbolic links:

<packet>
<service-plan>
<add>
   <name>base_plan2</name>
   <web-server-settings>
      <additional>ErrorDocument 401 /my_error_page.html</additional>
      <restrict-follow-sym-links>true</restrict-follow-sym-links>
   </web-server-settings>
</add>
</service-plan>
</packet>

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.