Hosting settings define what type of hosting is provided with a site. They are described by data type siteHostingAgentSet (site.xsd).

The graphical representation of siteHostingAgentSet (site.xsd) is as follows:

image 72663

  • vrt_hst, required

    This node contains virtual hosting settings. See the node definition below.

  • std_fwd, required

    This node contains standard forwarding settings. Data type: domainFFHostingBase (plesk_domain.xsd).

  • frm_fwd, required

    This node contains frame forwarding settings. Data type: domainSFHostingBase (plesk_domain.xsd).

  • The dest_url, required

    It specifies the URL to which users will be redirected at the attempt to visit the specified site. Data type: string.

  • The http_code, required

    It specifies the HTTP code for redirection when you use standard forwarding. Data type: integer.

  • The none, required

    This node is used when a site ships with a site. If specified, hosting settings will be deleted. Data type: none.

The graphical representation of the vrt_hst node is as follows:

image 66562

  • property, required

    It specifies a hosting parameter. Data type: PleskPhysHostingPropertyType (plesk_domain.xsd).

    Note: You can use domain properties to set up custom PHP configuration for your domain. For this purpose, use the same syntax as for php.ini (the name node should contain the name of a PHP parameter and the value node - its value).

  • name, required

    It specifies a hosting parameter name. Data type: string.

  • value, required

    It specifies a hosting parameter value. Data type: any.

Note: You can specify multiple property parameters in one vrt_hst node.

The following code represents the PHP handler parameter:

<vrt_hst>
   <property>
      <name>php_handler_id</name>
      <value>fastcgi</value>
   </property>
</vrt_hst>

The List of Website Properties

The list of website properties contains hosting settings you can set with the property parameter. Note that allowed properties’ values may vary depending on the server’s operating system and the list of installed components. For example, you can assign the php_version property only those PHP versions that are installed on your server.

To get the exact list of parameters and their values available on your system for a particular website, retrieve a hosting settings descriptor using the filter by id as described in Getting Descriptors of Hosting Settings.

Property name Possible Values Description
ssl true | false Turns on the SSL/TLS support for a website.
ssl-redirect true | false Turns on redirecting website visitors from HTTP to HTTPS version of the website.
iis_app_pool true | false

Turns on the dedicated IIS application pool for a website.

Works on Windows only.

php_handler_id

module|cgi|fastcgi (Linux)

cgi-5|cgi-5.3|cgi-5.4|fastcgi-5|fastcgi-5.3|fastcgi-5.4|isapi-5 (Windows)

Specifies a PHP handler for a website.
ssi_html true | false

Turns on the support for SSI in *.htm and *.html files.

Works on Windows only.

managed_runtime_version May vary depending on installed components.

Specifies the ASP.NET version for a website.

Works on Windows only.

www_root string

Specifies the root directory for a website.

Note: When you change the root directory of an existing website, Plesk creates new directory based on the Plesk’s virtual host template. The previous root directory is kept as is.

cgi_mode webspace | www-root

Specifies the location of the cgi-bin directory. It can be located either in the root directory of an entire subscription or in the root directory of a website.

Works on Linux only.

memory_limit

string

Note: Use the same values syntax as in the php.ini file.

These properties allow you to set the corresponding PHP settings.
max_execution_time    
max_input_time    
post_max_size    
upload_max_filesize    
safe_mode    
safe_mode_include_dir    
safe_mode_exec_dir    
include_path    
session.save_path    
mail.force_extra_parameters    
register_globals    
open_basedir    
error_reporting    
display_errors    
log_errors    
allow_url_fopen    
file_uploads    
short_open_tag    
magic_quotes_gpc    
additional-directives string

Specifies any PHP directive for a website. Use the same syntax as in the php.ini file to set directives:

<directive_name>=<value>

For example, error_log=/tmp/my_file.log

asp true | false Turns on the ASP support for a website.
asp_dot_net true | false

Turns on the ASP.NET support for a website.

Works on Windows only.

ssi true | false

service / domain, subdomain, webuser

Turns on the SSI support for a website.

php true | false Turns on the PHP support for a website.
cgi true | false Turns on the CGI support for a website.
perl true | false Turns on the Perl support for a website.
python true | false Turns on the Python support for a website.
fastcgi true | false

Turns on the FastCGI support for a website.

Works on Linux only.

webstat none | webalizer | awstats Specifies a statistics engine that will create reports on how a website is visited.
errdocs true | false Allows subscribers to design and use their own error pages that the web server returns with HTTP error codes.
write_modify true | false

This option is required if subscriber’s web apps use a file-based database (like Jet) located in the root directory of a website. Note that selecting this option might seriously compromise site security.

Works on Windows only.

web_deploy true | false Allows subscribers to publish site content through Web Deploy.
webstat_protected true | false Specifies whether web statistics reports should be accessible through a specific password-protected directory.
waf-rule-engine on | off | detection-only

Switches the web application firewall for a site to either of the following modes:

on, off, detection only.

waf-rule-set tortix | crs Specifies the rule set that should be used by the web application firewall. Supported values: tortix (Atomic ModSecurity rule set) and crs (OWASP ModSecurity core rule set).
nginxServePhp true | false Turns on the PHP-FPM support for a website.
web-server-expires <seconds> Configures the “Expires” response headers to HTTP responses and sets the expiration period of the cached content. The default value is 1209600 (14 days).
web-server-expires-static-only true | false If true, the “Expires” response headers fare added to static files only.
web-server-headers <HTTP response header> Ñonfigures additional headers to HTTP responses, for example X-Frame-Options: DENY.
nginx-proxy-mode true | false Turns on/off the proxy mode for nginx, allowing it to act as s proxy for Apache or (if turned off) to process HTTP requests on its own.
nginx-cache-enabled true | false Turns on/off nginx caching. The default value is false.
nginx-cache-size <bytes> Sets the nginx cache size in bytes. The default value is 67108864 (64 MB).
nginx-cache-timeout <seconds> Sets the nginx cache valid time. The default value is 5 seconds.
nginx-cache-key <cache key> Defines a key for caching. The default value is $scheme$request_method$host$request_uri.
nginx-cache-cookies <cookies> Configures nginx to cache HTTP requests containing certain cookies.
nginx-cache-bypass-locations <$request_uri> Configures nginx to not cache certain web content.
nginx-cache-bypass-header-nocache true | false If true, the HTTP response will not be taken from the nginx cache if HTTP no-cache headers are received in request
nginx-cache-bypass-header-auth true | false If true, the HTTP response will not be taken from the nginx cache if HTTP authorization headers are received in request
nginx-cache-bypass-get-nocache true | false If true, the HTTP response will not be taken from the nginx cache if GET nocache parameter is received in request
nginx-cache-use-stale-5xx true | false If true, a stale cached response will be used if the upstream returns 5xx server error. The default value is true.
nginx-cache-use-stale-4xx true | false If true, a stale cached response will be used if the upstream returns 4xx server error. The default value is false.
nginx-cache-use-stale-updating true | false If true, a stale cached response will be used if the nginx cache is being updated. The default value is true.

To get current property values of a particular domain, retrieve information about the domain using the get operator. See Getting Information About Sites.