Configuring Flash Communication Server > About the configuration files > The Vhost.xml file |
![]() ![]() ![]() |
The Vhost.xml file
The Vhost.xml file configures a virtual host within an adaptor. Each virtual host must have its own directory inside the adaptor directory.
The name of the directory must be the actual name of the virtual host, such as streaming.macromedia.com. Each virtual host you define must map to a DNS entry, or another name resolution such as a WINS address or a hosts file, that specifies an IP address on the server computer.
Each adaptor must contain a _defaultVHost_ directory in addition to the custom virtual hosts that you define. If a client application tries to connect to a virtual host that does not exist, the server attempts to connect it to _defaultVHost_.
Each virtual host directory contains a Vhost.xml file. This file contains tags that define the settings for the virtual host. These settings include aliases for the virtual host, the location of the virtual host's application directory, limits on the resources the virtual host can use and other parameters.
The Vhost.xml file contains the following tag structure, with brief comments for each tag:
<VirtualHost> <AliasList> <Alias name="acme">acme.myDomain.com</Alias> </AliasList> <AppsDir>C:\Program Files\Macromedia\Flash Communication Server MX\applications\</AppsDir> <RecordAccessLog>true</RecordAccessLog> <ResourceLimits> <MaxConnections>-1</MaxConnections> <MaxAppInstances>-1</MaxAppInstances> <MaxStreams>-1</MaxStreams> <MaxSharedObjects>-1</MaxSharedObjects> <AppInstanceGC>20</AppInstanceGC> </ResourceLimits> <VirtualDirectory> <Streams></Streams> </VirtualDirectory> <DNSSuffix></DNSSuffix> <Allow>all</Allow> </VirtualHost>
The tags in the Vhost.xml file are described below. You can change the values of some of these tags at runtime; to learn how, see the administration API article at Macromedia's website.
![]() |
|
![]() |
|
![]() |
|
For example, if the host name is |
|
<Alias name = "machineName">machineName.company.com</Alias> |
|
Do not use the same alias for more than one virtual host. If more than one virtual host on the same adaptor has the same alias defined, then the first match found will be used by the server. This can cause unpredictable results. |
|
![]() |
|
If nothing is specified in this tag, it defaults to C:\Program Files\Macromedia\Flash Communication Server MX\conf\_defaultRoot_\_defaultVHost_\ in Windows. On UNIX, the default <AppsDir> path is /opt/macromedia/fcs/conf/_defaultRoot_/_defaultVhost_/. |
|
This tag allows you to change the location of your applications directory and server-side script files, if you wish. For example, if you want to keep your application subdirectories and server-side script files in C:\Financial_Apps, you can specify that path in the |
|
You can also specify multiple applications directories by separating locations with a semicolon (;). For example, you could specify the following two locations, each of which contained application subdirectories: |
|
If you change the default location of |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
The default value of -1 allows an infinite number of application instances. If you specify a different value, it must be a positive integer. This value can be changed at runtime. |
|
![]() |
|
![]() |
|
![]() |
|
Garbage collection is processor-intensive. To keep memory as free of unused objects as possible, set this value to a shorter interval. To avoid a brief decrease in performance during garbage collection, set it to a longer interval. This value can be changed at runtime. |
|
![]() |
|
![]() |
|
For example, suppose you specify the following: |
|
<Streams>common;C:\FlashComServer\myApplications\shared\resources\</Streams> |
|
In this case, any application that refers to a stream whose path begins with |
|
If the virtual directory you specify does not end with a backslash, one is added by the server. |
|
You can specify more than one virtual directory mapping by adding multiple |
|
![]() |
|
![]() |
The |
The following set of Vhost.xml tags has been customized for real-world use. The alias acme
is defined for the virtual host. The application directory is set to C:\Inetpub\wwwroot\apps\. The maximum number of simultaneous connections is set to 50. The virtual directory for streams is set to \streamTemp. The domain suffix is set to macromedia.com for reverse DNS lookups. Finally, the virtual host will accept connections from any IP address.
<VirtualHost> <AliasList> <Alias name="acme">acme.myDomain.com</Alias> </AliasList> <AppsDir>C:\Program Files\Macromedia\Flash Communication Server MX\applications\</AppsDir> <RecordAccessLog>true</RecordAccessLog> <ResourceLimits> <MaxConnections>50</MaxConnections> <MaxAppInstances>-1</MaxAppInstances> <MaxStreams>-1</MaxStreams> <MaxSharedObjects>-1</MaxSharedObjects> <AppInstanceGC>20</AppInstanceGC> </ResourceLimits> <VirtualDirectory> <Streams>streamTemp;C:\sharedstreams</Streams> </VirtualDirectory> <DNSSuffix>macromedia.com</DNSSuffix> <Allow>all</Allow> </VirtualHost>
![]() ![]() ![]() |